I have a WPF application that has the title set to "Pioneer Document Handling Viewer" within the xaml:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mt="clr-namespace:DocumentHandlingTouch" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="DocumentHandlingTouch.MainWindow"
Title="Pioneer Document Handling Viewer" Height="909" Width="1020" WindowState="Maximized"
Icon="default_document.ico" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
But it shows up with an older title: when I run it.
I've tried a clean rebuild. Reopening the project, etc and the title still doesn't change.
Why would the XAML be different than the runtime title?
Related
Writing a program using WPF (with MahApps) In C# and wondering how can I disable a user being able to right click the TitleBar and brining up the window options menu?
Edit1: to confirm I would like to keep the min/max/close button on the bar, just remove the right click event
There is a new property in MahApps v2.x called ShowSystemMenuOnRightClick.
<mah:MetroWindow x:Class="MetroDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MahApps.Metro - Demo Application"
Width="900"
Height="600"
mah:DialogParticipation.Register="{Binding}"
GlowBrush="{DynamicResource MahApps.Brushes.Accent}"
ShowIconOnTitleBar="True"
ShowSystemMenuOnRightClick="False"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
</mah:MetroWindow>
I have been working on a project (C# WPF .NET Framework) for a while now and have got a problem and I
have already tried multiple things to try fix the issue when I build it is successful however
when I try to start/run the wpf it shows in Break Mode:
Cannot locate resource 'mainwindow.xaml
(Full: System.IO.IOException: 'Cannot locate resource 'mainwindow.xaml'.')
For my wpf I renamed everything to MainScreen:
<Window x:Class="***************.MainScreen"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:***************"
mc:Ignorable="d"
Title="MainScreen" Height="450" Width="800"
AllowsTransparency="True" Background="Transparent"
WindowStyle="None" ResizeMode="NoResize" FontSize="20"
>
If any of you need more information please add a comment with what you need.
Also I did the *'s because this project and name will be used officially, sorry and I hope you can understand.
In App.xaml, make sure StartupUri="MainScreen.xaml" is set up correctly.
I want to set the size for UserControl to design my app. But XAML Preview probably ignores the d:DesingHeight and d:DesingWidth properties. I can put the Height and Width properties but is uncomfortable because I will need removing them before running the app.
My XAML code:
<UserControl x:Class="CIevlev.ClinicApp.DesktopClient.ControlDoctorService"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CIevlev.ClinicApp.DesktopClient"
xmlns:viewModel="clr-namespace:SIevlev.ClinicApp.Interfaces.ViewModel;assembly=SIevlev.ClinicApp.Interfaces"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>
"d:" works in Visual Studio. I want to work in Visual Studio :(
How can I solve this problem?
I've written an installer with a WPF UI. During the installation of a pre-requisite, the full screen WPF ui loses focus and task bar appears for some time. Currently below is how my window element looks.
<Window x:Class="CustomBA.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resources="clr-namespace:KubeCustomBA.Resources"
mc:Ignorable="d"
Title="Installer" Width="1431" MinWidth="400" Height="588.9" MinHeight="300" ResizeMode="NoResize" WindowState="Maximized" ShowInTaskbar="False" Topmost="False" WindowStartupLocation="CenterOwner" WindowStyle="None" Background="#FF222222">
How can I avoid it from losing focus and showing the task bar? Any help would be much appreciated.
XamlParseException occured
Provide value on 'System.Windows.BAML.2006.TypeConverterMarkupExtension' threw an exception
I looked up examples of how to add an icon and it seems simple enough. How can I fix this?
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="DTV_Red_Zone_Channel.MainWindow"
Title="DirecTV Red Zone Channel" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize"
Initialized="WindowInitialized" SizeToContent="WidthAndHeight"
Icon="RCS_Generic.ico"> <---- Where it's Erroring
ah... it says it cannot locate resource 'rcs_generic.ico' but i put it in the main directory AND where the executable folder is... so where would i put it then?
You need to include the RSC_Generic.ico in your project (at the root, given your XAML), and make sure that it's properties are set to use a Build Action of Resource.