I'm trying to get a standard Ribbon Control working using VS 2010 on Windows XP. I've downloaded/installed the latest version of the Ribbon Control (October 2010) from the Microsoft Download Centre. From here I created a new project with the "WPF Ribbon Application" template.
The control itself works fine, but it seems to apply the Windows 2000 theme to the Minimise/Maximise/Close buttons, as can be seen in this screenshot:
I've tried changing the main window style to Aero in app.xaml (no effect on top right controls). I also tried (and failed) to set the Ribbon style to Office2007 (apparently the most recent version of the ribbon control has removed this feature).
Did I install something incorrectly? I installed both the *.msi files in the link. Am I missing a reference?
Any help would be much appreciated.
I figured it out, I know this is an old question but he this pops up in Google so for all the people that will see this in the future!
ANSWER DOWN HERE!!!
https://stackoverflow.com/a/21675624/3239917
Instead of the tags <ribbon:RibbonWindow on the beginning of the xaml,
Make it <Window .
Then in your class delete your : RibbonWindow
After that go back to your XAML, and change the Ribbon margin to -22 :
<r:Ribbon x:Name="Ribbon" prism:RegionManager.RegionName="RibbonRegion" Margin="0,-22,0,0" >
Related
Goal: Edit the ControlTemplate of a Window to remove the caption buttons via Blend (Close/Minimize/Maximize). Why? Need a window with a title bar (draggable) that can't be closed/minimized/resized. It's a temporary status window that pops up, etc. (I've seen solutions that go into the Win32 APIs, and wonder why. This should be doable via Blend!)
Anyway... Blend for Visual Studio 2017 seems to be OK with my attempt. At least initially.
Click "[Window]" in the Document outline and then select "Edit Template => Edit a copy"
Blend complies and gives me this control template.
However, immediately the XAML is flagged as having errors.
I figured "well, maybe this is just a designer issue. Maybe it will build." Nope.
"The type reference cannot find a public type named 'WindowInstance'.
"The name 'WindowInstance' does not exist in the namespace
'clr-namespace:Microsoft.VisualStudio.DesignTools.WpfDesigner.InstanceBuilders;assembly=Microsoft.VisualStudio.DesignTools.WpfDesigner"
Well, I've looked for "Microsoft.VisualStudio.DesignTools.WpfDesigner" on both NuGet and in the install folders and it doesn't seem to be there.
I've also read this solution, which mentions adding "Blend for Visual Studio SDK for .NET" in the Visual Studio 2017 installer under the "Individual Components" page. I've done that. Still I have the error.
I'm uncertain where Blend got the initial ControlTemplate from in the first place if it doesn't resolve to an assembly on my machine.
Regarding the actual solution... what I'm doing now is faking a window with a title bar (that has no buttons) and using the system brushes to make it look like a window with a title bar--but that isn't draggable... which is another problem to solve.
Really, why I can't do something as trivial as removing control buttons from a window is beyond me. I suppose there are philosophical reasons to not allow people to remove the close button on a window, but that shouldn't be some arbitrary call that a dev at Microsoft gets to make for me or anyone on my team.
Thank you for your assistance.
Chad.
out current application is a DevExpress Ribbon window. However, we have some legacy code - including a WPF Control which was hosted through a WinForms Window - with WPF Host. (please dont ask why)
I wanted to change the UserControl at least to a Wpf Window to get rid of WinForms.
Now here is my Problem: All stlyes get totally messed up. Especially my buttons have a problem:
The buttons lose their assigned Images, and also Background and Foreground is not assignable. Through the Live Visual Tree from Studio I see that it is overridden.
I guess the thing with images leads to the same root cause.
I dont want to redo the whole window again in DevExpress (if this is the cause).
Is there a way for a window to not use some application styles and run as default? Or how can I find out, what is actually overriding everything?
I finally found the solution. The DevExpress was overriding any styles of any form in application, settings something to the DevExpress.Xpf.CoreTemeManager.
To disable a style, I had to add the following thing to my window:
<Window x:Class="AnotherWindow"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
dx:ThemeManager.ThemeName="NoneName"
<!-- ...-->
</Window>
Also include DevExpress.Data and DevExpress.Xpf.Core references.
Visual Studio Community 2015. Xamarin Test Project.
I have a project which have some layouts - Layout.xaml
It shows the designer - it looks like an XML editor of some sort - but what I am looking for is the Visual Xaml Designer - where you see the results of what you do.
If you open any WPF project you will and doulbe click any of its default Xaml files - you will see a nice looking Xaml Visual and Code Editor combined. How can I enable the same within my Xamarin project?
Why Xaml that is in WPF project shows that nice Visual Editor and Xamarin Project does not? Is there a way to bind it?
It has to depend on the project type I assume.
PS: I have a droid project and the iOS and a portable library where I have those XAML files.
If you have any more questions - please ask.
Update
I tried installing Microsoft.Xaml (through Nuget Package manager) - still no luck
Update 2
I create a basic WPF project and look at its references. I matched it identically with my project - but still no luck
Update 3
WPF Project has different properties (which makes sense)
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
And my XAML files have these
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Even though I knew manipulating those would not launch Xaml Visual Designer - still tried that with no luck.
What loads this XAML Visual Designer for the WPF project????
This is the answer - there is a Xamarin.Forms Previewer
Use the View > Other Windows > Xamarin.Forms Previewer menu in Visual Studio to open the preview window. Use the Window > New Vertical Tab Group menu to position it side-by-side.
There is no direct possibility for a preview of your XAML-views, but you can use Gorilla Player(http://gorillaplayer.com/) a software which allows a such function
[EDITED]
After several tries, I found out it was the Microsoft WPF Ribbon that causes the title bar style not rendering correctly.
Application without Ribbon in XP:
Application with Ribbon in XP:
I have already set the theme to be XP style. Still not fix. It is a bug in Microsoft Ribbon or am I missing something? On Window 7, on the other hand, renders OK.
Develop on WPF C# .NET 4, VS2010.
Why do you care? this is a user setting to have Aero enabled or not in Vista or 7 and theming enabled or not in XP like in 2 and 3 pictures you sent.
In general you should ignore this. Office 2007 and 2010 with ribbon UI renders the same but because ribbons are skinning the application windows completely.
My suggestion is to either use skins and do the same or simply ignote this because if I use Vista with Aero enabled I would not like your App to look like classic Win2000 applications.
This is anyways an issue with the window title bar as it will use the default theme of the OS you are using.
I suggest you to neutralize the style by implementing a custom window style that takes the windows 7 look n feel for all windows ion your applications. Have a look at the MessageBox control from latest extended WPF toolkit.
It has a windows 7 style themse that looks exactly same on all the above OS if you use
Window.AllowsTransparency="False"
Window.WindowStyle="None"
Window.Style="{StaticResource Windows7WindowStyle}"
I am using the latest WPF Ribbon control downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2bfc3187-74aa-4154-a670-76ef8bc2a0b4&displaylang=en
In Windows XP, the Ribbon application window’s title bar looks like from Windows 98… or like from console window. How can I improve the appearance of tittle bar.
Answered by a Microsoft Consultant:
The RibbonWindow ships with three templates as of the October 2010 release - Classic, Aero Basic, and Aero with glass. On XP's Luna theme, we fall back to displaying the Classic look for the RibbonWindow. It should be fairly easy to retemplate RibbonWindow to achieve the native XP look - use our RibbonWindow templates in the Ribbon Source and Samples MSI as an example. If we get feedback from several customers that the Luna theme is a top request, we will definitely consider including that for our next release.