Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,198 Members 40,184 Now Online
XDA Developers Android and Mobile Development Forum

[2nd release]SenseSlider .NET CF Control 0.2

Tip us?
 
LunaticShade
Old
(Last edited by LunaticShade; 12th May 2011 at 05:56 PM.) Reason: new version
#1  
LunaticShade's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 19
Join Date: Nov 2007
Default [2nd release]SenseSlider .NET CF Control 0.2

Because the SenseSDK which is available at xda lacks a control for the HTC Slider I tried to create my own.

I finally fixed some bugs and changed a bit of the behavior and here is the first release version of my SenseSlider control.

The 2nd release is ready and stable. See Changelog for further info.

Features:
  • mimics HTC Slider
  • fully functional .net Control
  • does not depend on images for the bar background/slider thumb (drawn at runtime) and therefore allows different color-schemes
  • events for SelectedIndexChanged, StartedSliding, StoppedSliding, OnSliding (Gives thes index of the hovered icon)
  • supports vibration (aka haptic feedback)
  • includes a semi-transparent panel for overlay when sliding
  • does not depend on other control collections (SenseSDK only used for demo application; can be used with any other collection) (does not apply for new version, uses SmartDeviceFrameWork)

changes in the 2nd release:
  • uses the IImaging-Implementation of the SmartDevice-Framework and is now stable and more flexible (load the IImages with SDF in any way and add them to the slider)
  • supports an imagefile as slider thumb (see attached screenshot)
  • great speed improvement (fixed a bug which slowed drawing down)
  • made the source code of the demo application a lot more readable and understandable (or at least I hope so )

I uploaded a demo application to show some of the control's features. The source code for the demo is also available.
To use the Slider in your own applications just add the SenseSlider.dll and instantiate LunaticShade.SenseSlider (see the source of the demo application for details). (The new Version needs also the OpenNETCF Assemblies enclosed in the package or an installed version of the SmartDeviceFramework on the target device)
At this time the control cannot be drawn at designtime (due to heavy P/Invokes) but you can set the properties and events with the property editor.

Please report any bugs you may encounter.

If you got questions just ask
Attached Thumbnails
Click image for larger version

Name:	senseslider.jpg
Views:	2716
Size:	26.5 KB
ID:	316193   Click image for larger version

Name:	senseslider2.jpg
Views:	2659
Size:	42.5 KB
ID:	316194   Click image for larger version

Name:	senseslider3.jpg
Views:	2525
Size:	35.0 KB
ID:	316195   Click image for larger version

Name:	CustomThumbScreen.jpg
Views:	628
Size:	50.9 KB
ID:	409014  
Attached Files
File Type: rar SenseSliderDemo_src.rar - [Click for QR Code] (1.41 MB, 686 views)
 
Obelix_A
Old
#2  
Member
Thanks Meter 1
Posts: 81
Join Date: Oct 2007
Location: Passau
looks quite interesting. I will give it a try as soon as I can integrate in my apps (testing makes no sense - I also have HD2 )

keep on developing!
Obelix
read my lips: NO MORE BUGS!!
--
 
Wyatt
Old
#3  
Wyatt's Avatar
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Dec 2007
Location: Nantes
Looks cool ! I'll try it as soon as a release is available !
 
ZaxXx
Old
#4  
Senior Member
Thanks Meter 19
Posts: 247
Join Date: Jun 2007
Location: Prague
Looks nice, not exactly like Sense (no vibration, no left-right/right-left gesture, if I tap&hold some icon and then swipe to left or right, the slider doesn't follow my finger), but good. Can't wait to be able to use it in my apps
 
LunaticShade
Old
#5  
LunaticShade's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 19
Join Date: Nov 2007
first release,
see first post
 
Archer
Old
#6  
Archer's Avatar
Senior Moderator / Recognized Developer - (Un)Recognized Pole Dancer
Thanks Meter 3941
Posts: 13,627
Join Date: Jul 2008
Location: Northampton
That's VERY nice mate. I'm also particularly pleased that you used the Sense SDK interface in your demo, as I was considering using this slider in one of my apps that uses the Sense SDK heavily. I'm not considering it any more though - I'm all over it

I'm not currently at a dev machine and therefore can't really check out the control, so I do have one question that I may be able to answer if I looked in the IDE. Can you stop it changing page by sliding left and right on the page itself? I'd rather people had to use the slider to change page.

But yeah, very nice - thanks a lot!
.
"I live by my own rules, nobody else's, not even my own."
.
My xda links

New User Guide | XDA Forum Rules | 10 Posts - Why and How? | Admins & Mods | My xda Bookmarks

.

.
 
LunaticShade
Old
#7  
LunaticShade's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 19
Join Date: Nov 2007
I'm glad to hear that you like it.

Quote:
Originally Posted by johncmolyneux View Post
Can you stop it changing page by sliding left and right on the page itself? I'd rather people had to use the slider to change page.
Actually it is the WinMo 6.5 TabControl which exposes this behavior. If you slide over a TabPage it changes the tab respectively, the senseslider then only reflects this action. So this is not the default behavior of the Slider (actually you could just set back the SelectedTab if it was not changed by the SenseSlider).
 
Archer
Old
#8  
Archer's Avatar
Senior Moderator / Recognized Developer - (Un)Recognized Pole Dancer
Thanks Meter 3941
Posts: 13,627
Join Date: Jul 2008
Location: Northampton
Ah fair enough. I didn't realise you'd used a tab control, but I guess that makes sense.

Thanks for the reply mate
.
"I live by my own rules, nobody else's, not even my own."
.
My xda links

New User Guide | XDA Forum Rules | 10 Posts - Why and How? | Admins & Mods | My xda Bookmarks

.

.
 
TeDeV
Old
#9  
Senior Member
Thanks Meter 108
Posts: 694
Join Date: Aug 2007
Location: Athens

 
DONATE TO ME
nice control man.

i got 4-5 times a crash on the program. when i changed the button slider color, and stopped the vibration, then when i moved the slider fast from left to right, etc, an error occured.

overall nice work. i don't know if it is your icons, or the real time drawing, but the icons at the slider have a very bad quality. hope you can make the graphics much more similar to the HTC Slider looks

well done for a 0.1 version.
 
TeDeV
Old
#10  
Senior Member
Thanks Meter 108
Posts: 694
Join Date: Aug 2007
Location: Athens

 
DONATE TO ME
anyone knows what is wrong with this line?

Dim imageNames = assembly.GetManifestResourceNames().Where(Function (r) r.Contains("_b"))

i can't get the slider to work having a vb code. this slider needs so many things. i guess the reason that my slider is not working right now is because of the above code line, which returns me nothing, even though i have a picture which contains _b in the name

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Benchmark Your CPU Performance with Mini CPU Integer Script

When it comes to device testing, there are two types of people on XDA. The first … more

Rid Yourself of Charging Annoyances with No Wake on Charge Xposed Module

Almost every OEM has skinned and otherwise modifiedAndroid to suit … more