How to implement slider/progressbar for video app, YouTube style? - wpf

I want to implement slider/progressbar like YouTube style. That means when mouse on the progressbar the tooltip show the time position exactly. How can I do that?
Should I use Slider? or perhaps ProgressBar?
Thanks in advance!

please look into the jobi's link for the slider previews may this can help you
http://jobijoy.blogspot.com/2009/07/attaching-preview-behavior-to-wpf.html

I want to revisit this question in 2013. As of Aug 13, 2013 youtube has a progress bar implemented at the top of the website. A redline crosses the screen from left to right at the place where the browser(probably bookmark bar for some) meets the actual website.

Related

D3 zoom and pan zooming independently on mouse and programmatically

Could some kind and clever D3 soul please put me out of my misery. I have the following example setup - https://codesandbox.io/s/compassionate-night-kpqc8t?file=/src/App.js. There are zoom buttons and the svg takes mouse events to initiate zoom. Problem is that the zoom triggered by the button is independent of that triggered by the button.
I believe this stackOverflow describes the problem and the solution - D3.zoom jumps when using mouse wheel after programmatically zoom - I just cannot figure out the implementation for the life of me in the context I have.
I got it to work. I'm not entirely sure what the difference is, but somewhere along the line I must've been targeting the wrong element...
At the bottom of this article - https://www.d3indepth.com/zoom-and-pan/ - is an example codepen. Following the codepen to the letter resolved my issue.
Thanks,
Simon

How do you design an image for Codename One TouchCommand?

I am 2 days in experimenting with Codename One and Mobile development in general and tested out some basic navigation and features so far. Now I want to work on the look and feel of the app.
I looked at the 9-border vid which was helpful, but not sure of the best way to add an image for the touchCommand that takes 3 tabs on that bar ( Example: home, profile, settings.. Similar to how instagram's TouchCommand is at the bottom of the app).
If I add the image, it does not line up with my Commands.
What is the best way to approach this to ensure the "TouchCommand" image appears as one, but is broken up to 3 parts for each individual commands when pressed, home, profile and settings? I might be asking this all wrong, forgive me as this is all new to me.
Thanks.
EDIT:
This is what was done.
In Theme -> Constants added commandBehavior= bar . This gives the default bar at the bottom. Created in photoshop a new bar 300x80 and added it to the TouchCommand. (See ScreenShot 1). Took this bar and broke it up in photoshop into 3 different buttons for the tab press etc. In GUI Builder, added Home, Profile, Settings in the commands. Added the image to Press Icon for Home and it didnt line up (screenshot 2). Very Frustrating to design layouts. I am hoping there is a much better technique as I am still experimenting with Codename one?
What is unclear to me, is I cant find any documentation on how to approach this and what the dimensions of each image should be as it seems that codename one has issue aligning them. I am assuming the steps would be to create the background image and add the icons as interactive layers for the user. I really care for the image being pressed and changes color like the instagram example. I dont see a way to do this in codename one GUI builder and themes.
EDIT:
Okay, I have decided to use tabs instead of the bar at the bottom. If I add my image to it, I get the results (screeshot 3). Is this the right method to use to accompolish what I want? If so, I dont see a way yet to alter this to become what I want :( .
Plus adding the background, shows one size in the display and looks different in the simulator. (screeshot4)
Answered Here: How do you get ActionBar from SocialBoo theme to show up in your GUI?
Tabs are customized individually so the border should apply for an individual tab to create the background. The foreground element is the icon which you define in the Tabs component itself thru the icons property which allows you to define 3 icons for the 3 tabs (assuming you use the GUI builder). If you add the tabs via addTab in the code you can specify an icon there.

Is it possible to display a frame during a CameraCapturetask on WP7?

I would like to use the CameraCapturetask on my Silverlight WP7 application. On the background, I would like to display a photo, for example something like that :
(found randomly on the web).
This could act as a mask, and we will see the photo of the camera behind this frame during the take of the photo.
(I'm not sure I'm very clear).
Is there a way to do that ?
Thanks in advance for any help.
Best regards
No, you can't put this on top of the CameraCaptureTask.
You could add the border after the photo had been taken though.

Display percentage on piechart in WPF

Hii
Can anyone tell me how can I show percentage on the piechart....
The percentage is seen on mouseover event but I dont know how to show
the percentage on the piechart's slices....
If you are looking to put labels on the chart itself (instead of tooltip), take a look at this great blog post by WPF guru Bea Stollnitz.
It shows how to do this, in many different modes, and explains not only how, but why.
Take a look at amCharts Bundle for WPF. Pie chart supports labels on the slices, outside connected labels and includes an algorithm to prevent label overlapping.
I've just followed this tutorial (just to make sure) and I get the percentages of each slice as tooltip on mouse over by default.
If you post your code we might be able to spot if there's a problem with it.
You can use labelFunction in mx:PieSeries, and lableFunction look like that
private function pieSeries_labelFunc(item:Object, field:String, index:Number, percentValue:Number):String
{
return StringUtil.substitute("{0} ({1}%)",item.description,percentValue.toFixed(1));
}
Where description is the label that you want to see.
feel free to ask any question.

How to achieve rotating form effect in wpf

I would like to make a rotating form WPF effect like the one in the norton antivirus 2010.
The effect is a rotating form that changes the contents when the other side is shown. But the axis is not in the center of the form but moves from side to center and back. Like a three step effect.
The rotating form can be seen at 8' 07" in this video: http://www.youtube.com/watch?v=A3hHPdgi9Nk&feature=related (I'm sad but this was the only video I found on YouTube)
Thanks.
Have a look at the Thriple stuff on CodePlex: http://thriple.codeplex.com/
It's almost exactly what you're after.
Hope this helps.
I did not examine the details, but I know that Microsoft's patterns & practices team also uses a similar animation in their "StockTrader Reference Implementation" for the "Composite Application Guidance". They sub-classed the TabControl and added some animation to it. I think the relevant code parts can be found here:
AnimatedTabControl.Desktop.cs
Generic.xaml
just verify this link. It has code as well as the Sample.
From the Sample take the TransitionPresenter link from the left panel and choose the 3D Rotate item from the listbox. Then select the images from the top list. You can see the same effect in the video. I saw some initial sanp of the video and may be this link can help you.
http://bot.codeplex.com/

Resources