Remove back button in ModernUI plugin for wpf - wpf

I am trying to develop a modern wpf application using the MUI package. However I do not wish for the back button to be present and I tried to follow the steps mentioned in this link but it is not working.
I am getting errors as controls not defined in namespace, etc. Basically, I cannot get the code to compile. What am I doing wrong?

Because the TargetType property in the Style references controls from the ModernUI library, you need to add the XML namespace for the ModernUI controls in the ResourceDictionary containing the Style.
I don't know what that namespace is, but need to add something like this:
xmlns:mui="clr-namespace:FirstFloor.ModernUI.Windows.Controls;assembly=FirstFloor.ModernUI"

Related

How do I add a User control to Content Page in Xamarin Forms?

I have to create a Cross Platform Application using Xamarin Forms. Here I am going to use a third party user control Templates for design. But the usercontrol and content page have a different base classes .
How do i achieve my goal?
If you are using XAML then you should probably take a look at XAML namespaces. Otherwise, simply add your namespace to your code & you should be able to use your controls.
For XAML, here you can find a sample of using custom control (line 11). Namespace declaration in line 4.

DataGridHeaderBorder missing in System.Windows.Controls

Recently i moved my project from .Net3.5 to .Net4. In earlier version to use DataGrid, i was using wpfToolkit and its working fine. But after moving to .Net4 i don't want to explicitly add the refernce to my toolkit since DataGrid has been moved under Controls namespace.
But, all the related references have been moved except for the DataGridHeaderBorder under Controls namespace. To use this we have to explicitly ad reference to PresentationFramework.Aero. I referred to these URL's -
WPF4 DataGridHeaderBorder in a xaml Style
https://connect.microsoft.com/VisualStudio/feedback/details/584894/wpf4-datagridheaderborder-in-a-xaml-style
But i can't add the PresentationFramework.Aero to our project since Aero theme may not be present for all the target environments. So, is there any workaround i can try to get it working? Any how can i get the code from assembly PresentationFramework.Aero for DataGridHeaderBorder so that i can override or subclass it in my code. Any help?
I think you could download latest source code of WPFToolkit and extract DataGridHeaderBorder styles from it.
It has DataGrid\Microsoft\Windows\Controls\DataGridHeaderBorder.cs and corresponding Aero, Classic, Luna themes in DataGrid\Themes\* too.

How do I access to the resources in the Fluent Ribbon Control Suite?

I'm developing a WPF application that uses the Fluent Ribbon Control Suite and i'd like to use its 'themes' in the rest of the application.
Specifically, when you choose to use the Blue theme
<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2010/Blue.xaml" />
I would like to use some of the colours inside that file, to style other interface elements (buttons, popups etc).
Any idea how I might do this?
You can try this, but it's not ideal…
Downloaded the Source Code from here and open it up in Blend.
Using the Resources tab, browse the different ResourceDictionary file (ColorsBlue.xaml, Button.xaml etc.)
Make a note of the resource keys for the resources you want.
In your original application add the styles/colours etc you want.
Now whenever you change the theme (Blue/Black/Silver etc) it will automatically change the background colour of your controls!
Hope that helps.

Resource Dictionaries in a Silverlight Assembly?

I've just begun dabbling in putting together a set of controls as assemblies and I'm working on default styling. What I currently have is a UserControl in a project (thanks Reed!) and I'm able to bring that into another project via reference. I plan to add more controls over time to build something of an SDK.
I currently have some hooks that look for resources in the hosting application which either apply the resources to their respective properties, or style out the control via hard coded defaults.
Is it possible to set up resource dictionaries within the project containing the UserControls so they can use those references as the default, instead of hard coding? If so, how do I target them?
(I have a ResourceDictionary set up within the same project as the controls: Resources>Dictionaries>Colors.xaml)
Thanks in advance!
E
You should really look at creating custom templated controls in library rather than derivatives of UserControls. This will allow projects that reference your library to specify an alternative default style for you controls in the same way as we can for the controls in Microsofts own SDK.
The Creating a New Control by Creating a ControlTemplate topic on MSDN is good starter.
I think this is a better explanation, but i'm trying on a desktop application and i got the same problem.
XamlParseException: Failed to create a 'System.Type' from the text 'local:CustomerEntity'
If I'm undestanding correctly you want to create the file "generic.xaml" in the folder "Themes". However, I don't believe automatic styling works with UserControl only with Control. Generally if you trying to make a control that can be stylized and retemplated you want to inherit from Control and not UserControl.

Custom Controls with Blend

I'm building custom control for my Silverlight 2 app. It's in one SL class project, and it contains two files:
MyControl class, inherited from Control, with few DepedencyProperties
themes/generic.xaml, with visual elements (ControlTemplate), states for VSM and transitions
I created whole xaml by hand, and it works, but want to use Blend2(SP1) for editing! When i open generic.xaml in Blend, and switch to Resources tab I don't have anything to edit.
For example, when I put that visual template and states definition to App.xaml (of my main SL project), I can access all elements and States through Resources and States tabs, and edit them visually.
Does Blend even support editing generic.xaml from SL2 class project?
What's the best practice for building custom controls? I don't want to my custom control depends on anything from main SL2 project, but want them to be skinnable, and be able to change skins (themes) dynamically.
You can edit this with Blend.
Open your controls project in Blend.
Open your generic.xaml
click the Resources tab
Expand generic.xaml
Double click the style resource you want to edit.
In the Objects and Timeline section, right click the Style and select "Edit Control Parts -> Edit Template"
Now you can edit the template in the generic.xaml. Sounds like you're already following best practices by having the parts and states. If you want the full blown best practices take a look at this detailed post on how to deal with design time extensibility. There you will find out how to do the Visual Studio and Blend design time stuff for Silverlight.
I recreated whole project, and suddenly can edit my generic.xaml from Resources. But can't add news stated in Blend, for that I must go to xaml.

Resources