I am working on a windows universal app called ProPlayer and you may see this preview app on Windows Store .
Now I am working on a new version and I used MediaElement instead of Microsoft player framework in this new version . I am trying to modify some parts of MediaElement but couldn't find any way . I used AreMediaTransportControlsEnabled to show this controls and generate a resource dictionary for media element style . I want to make background of MediaTransportControls transparent or change the opacity of these controls .
(source: picofile.com)
How does it possible
Not possible for the system default media transport controls.
You need to create your control or just simply put something like a stackpanel and put it into a popup control to replace the default system media transport controls, cause the system default one doesn't expose required property you want.
There is a tutorial and the relevant sample for win8.1. I didn't try everything in UWP, but the principle is same, so you can start from there. And you can add more cool design on the panel to make your ProPlayer more PRO. :)
Related
WPF and Windows Forms Interoperation
Description on MSDN:
In a WPF user interface, you can change the z-order of elements to control overlapping behavior. A hosted Windows Forms control is drawn in a separate HWND, so it is always drawn on top of WPF elements.
*But I would like to know there is no private way to solve it?
No, this is known as the airspace problem (because WinForms elements take all of it).
There was supposed to be a fix around .NET 4.5/4.6 but it never made it to production (source; there are others if you google it). There has been no word as of yet that Microsoft plans on addressing it.
This article might help with ways to get around it: MSDN
My first recommandation would be to replace the Windows Form control by an equivalent WPF control.
Second recommandation would be to accept the limitation and do not overlap any WPF control over the Windows Form control.
In some case, you might be able to use multiple top-level Windows to work around the limitation. You then have to write some code to properly synchronize the location or the apparent activation state of Windows...
I have never done that between Windows Form and WPF but I have done 2 top-level windows in Windows Form so that part of the UI could be semi-transparent (the purpose was to be able to overlap another application (maybe a PDF viewer) so that we can "copy" curves from existing charts).
I am developing a win store application, user can launch other file/application from my application. At that point, I want to keep my application in front of user in the "snap view"
For Windows 8.0, there wasn't a way to control this. In Windows 8.1, the Windows.System.Launcher API--namely the LaunchFileAsync and LaunchUriAsync methods that take a LauncherOptions argument--added support for the LauncherOptions.DesiredRemainingView property. This gives you the kind of control you're looking for here--in your scenario you'd want to use the value ViewSizePreference.UseMinimum in the DesiredRemainingView property.
I am aware of app bar icons and menu items in Windows phone. What I want it is an app bar similar to phone's default windows phone store where it shows up "try", "buy" and share in menu item... How can I achieve this? I looked into documentation of ApplicationBar, but it didn't help.
I want normal buttons to be inside application bar.. If that is not possible in appbar how can I mock something similar to the one which shows up in windows phone store..
Not sure that it is possible
Though, you may try to take a look at some custom appbars. For example, Cimbalino appbar is made as behavior (so it supports binding) - probably, you'd be able to set button's style either.
I'd like to get ahead of the pack and start making some custom C# controls and components for Metro (Win8), but I can't find any documentation or blog posts on how to start, or even if it's possible right now.
Are metro controls just WPF controls? I'm not yet a WPF developer; creating a custom user control looks straightforward, but that project type doesn't exist in the Windows 8 developer preview. So, are WPF custom user controls (VS2010) the project type I should use for creating my Metro controls? Beyond that, I can't find any documentation on how to create a component for use in WPF/Metro; can you create one, or would it just be a custom user control that isn't visible? (I was hoping for some type of component container like the one winforms use; are components for Metro now only class libraries, and don't include designer support anymore?)
It's ... very difficult right now. There's no way to override OnRender or the like for a control, ie to create code to render a control with a custom appearance. However, you can create a custom template. Anything you can do in the template is legal, and that's how you have to approach custom controls.
One other option is to generate your UI using either raster (Bitmap) or vector (Windows.UI.Xaml.Shape?) components directly and build up your UI like that. Bleh.
Win8 Metro is a lot like WPF, but it isn't a subset. Similar but very different. Many WPF controls didn't make the transition to Win8 Metro; the same level of rendering control isn't available; and some system features (like advanced font rendering) aren't there. All this might change in coming releases, but right now it looks like Microsoft is trying to restrain developers from creating custom UI controls.
I would like to use this for my WPF application. WPF Battery Control.
It is about a IPhone based battery control in silverlight.
However, I have no idea how to go about it, and would like to ask for help.
Here is the link: http://advertboy.wordpress.com/2007/09/11/iphones-beautiful-battery-recharger-as-a-silverlight-animation/
And source code: https://skydrive.live.com/?cid=1e3f9e1e2f8bc994&id=1E3F9E1E2F8BC994%21221#
if you have the source, just make a WPF app, and add the code for the control. it should build w/o any problem.
silverlight is a sub-set of WPF, so most silverlight code should build w/o any problem. the reverse is not true, however--most WPF code won't build in silverlight.
The code you've linked to is a Silverlight 1 application, so porting isn't simply a case of copy the source across.
The XAML markup for the battery is in iTunesControls\Recharging\BatteryRecharging.xaml. Most of this appears to work as-is. Copy the entire contents of this file into a user control or custom control in your WPF project, and then remove the xmlns, xmlns:x and xmlns:a namespace references and the x:Class attribute from the root <Canvas> element.
To vary the amount of charge shown within the battery, set the Widths of the elements with names pthFiller and pthFiller1 to a value between 0 (empty) and 314 (100% full).