in this Code window state is maximize and that's fine, but when i run this code
window is on Fullscreen but stackpanel and grid not on full screen.
here is my Code
<Window x:Class="POSApplication.POSSystem"
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:POSApplication"
mc:Ignorable="d"
Title="POS System" Height="600.857" Width="908.571" Background="#04c582" Loaded="OnloadPage" ResizeMode="NoResize" WindowState="Maximized" WindowStyle="None">
<Grid Name="MainGrid" Margin="0,0,-6,0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel HorizontalAlignment="Left" Height="346" Margin="0,68,0,0" VerticalAlignment="Top" Width="171">
<Button Content="Customers" Height="54" FontSize="20" FontWeight="Bold" Name="Customers_Btn" Click="Customers_Btn_Click"/>
<Button Content="Products" Height="54" FontSize="20" FontWeight="Bold" Name="Products_Btn" Click="Products_Btn_Click"/>
<Button Content="Users" Height="54" FontSize="20" FontWeight="Bold" Name="User_Btn" Click="User_Btn_Click"/>
<Button Content="Sale" Height="54" FontSize="20" FontWeight="Bold" Click="Sale_Btn"/>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Height="63" VerticalAlignment="Top" Width="892" Background="#04b550">
<Label Content="POS Sytem" Margin="0,20,0,0" Width="120" Height="40" FontSize="20" FontWeight="Bold" HorizontalAlignment="Center"/>
<Button Content="Log Out" HorizontalAlignment="Left" Margin="770,-40,0,0" VerticalAlignment="Top" Width="100" FontWeight="Bold" Click="LogOut_Button_Click" Height="40" FontSize="20"/>
</StackPanel>
<WrapPanel HorizontalAlignment="Left" Height="440" Margin="176,68,0,0" VerticalAlignment="Top" Width="700" Background="White" Name="main_panel" />
</Grid>
Related
Im trying to create a progress bar for one of my computer configuration scripts and I'd like to avoid adding a button or some kind of trigger to the GUI,
The script is powershell and for the GUI XAML:
<Window x:Name="BackUp_MAINWINDOW" x:Class="ProgressBarTest.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ProgressBarTest"
mc:Ignorable="d"
Title="88%" Height="110" Width="510" Icon="C:\Users\rsosa012\Documents\Scripts\Powershell\ICOs\PwC.ico" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen" Top="0" FontFamily="Georgia" Margin="0,-1,0,0" FontSize="11" SnapsToDevicePixels="True" BorderThickness="0">
<Window.TaskbarItemInfo>
<TaskbarItemInfo Description="Progress" ProgressState="Indeterminate" ProgressValue="50"/>
</Window.TaskbarItemInfo>
<Grid>
<ProgressBar HorizontalAlignment="Left" Height="17" Margin="10,44,0,0" VerticalAlignment="Top" Width="410" Value="50" Opacity="0.6"/>
<Image HorizontalAlignment="Left" Height="50" Margin="435,10,0,0" VerticalAlignment="Top" Width="50" Source="C:\Users\rsosa012\Documents\Scripts\Powershell\ICOs\PwC.ico"/>
<Label Content="Name: " HorizontalAlignment="Left" Height="20" Margin="10,6,0,0" VerticalAlignment="Top" Width="46" FontFamily="Georgia" Background="{x:Null}" Foreground="Black" FontSize="10" FontWeight="Bold"/>
<Label Content="Items remaining: " HorizontalAlignment="Left" Height="21" Margin="10,19,0,0" VerticalAlignment="Top" Width="110" FontFamily="Georgia" Background="{x:Null}" Foreground="Black" FontSize="10" FontWeight="Bold"/>
<TextBlock HorizontalAlignment="Left" Height="15" Margin="392,28,0,0" TextWrapping="Wrap" Text="88%" VerticalAlignment="Top" Width="28" FontSize="12" Opacity="0.6"/>
<TextBlock HorizontalAlignment="Left" Height="11" Margin="51,12,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="62" FontSize="9"/>
<TextBlock HorizontalAlignment="Left" Height="11" Margin="106,25,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="62" FontSize="9"/>
</Grid>
My question is about the events of these controls, does any of these controls have an event that triggers when the .showdialog() method executes, basically when the window appears?
Thanks in advance.
I have started learning wpf. I am trying to use line element but whenever i try to run this code line is not visible at all. Same case with rectangle, I have used rectangle element as well but it is also not showing up. What is the problem? I don't understand. I am able to see that in designer view but not in the runtime.
<Window x:Class="Mi_Express.Product_Details"
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:Mi_Express"
mc:Ignorable="d"
Title="Product_Details" Height="1920" Width="1080" WindowState="Maximized" ResizeMode="NoResize" WindowStyle="None"
Foreground="White" FontSize="30" FontWeight="Bold" Topmost="True" Background="White">
<Grid>
<Line HorizontalAlignment="Stretch" X1="10" Y1="10" X2="870" Y2="10" Stroke="Black" StrokeThickness="4" Margin="120,180,79,1712"/>
<Label Content="Shopping Cart:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="157,125,0,0" FontSize="30" FontWeight="DemiBold"/>
<Rectangle HorizontalAlignment="center" Height="73" Stroke="Black" StrokeThickness="3" VerticalAlignment="Top" Width="1017" Margin="28,1663,35,0"
/>
<Image HorizontalAlignment="Left" Height="102" VerticalAlignment="Top" Width="139" Margin="157,270,0,0"/>
<Button Content="Go Back" ClickMode="Press" Background="#FFE87E04" BorderBrush="#e87e04" FontSize="18" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Top" Width="174" Margin="157,1786,0,0" Height="61"/>
<Button Content="Continue" ClickMode="Press" Background="#e87e04" BorderBrush="#e87e04" FontSize="18" Foreground="white" HorizontalAlignment="Right" VerticalAlignment="Top" Width="160" Margin="0,1786,159,0" Height="61"/>
</Grid>
</Window>
The problem here is with the structure of your grid ..Dont apply margin to any of the UI elements over here.. instead remove it and use grid.column to position your UI elements..I have modified your code a litte
<Window x:Class="WpfApp1.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Line Grid.Column="0" HorizontalAlignment="Stretch" X1="10" Y1="10" X2="870" Visibility="Visible" Y2="10" Stroke="Red" StrokeThickness="4" Margin="12,18,79,171"/>
<Label Grid.Column="1" Content="Shopping Cart:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="157,125,0,0" FontSize="30" FontWeight="DemiBold"/>
<Rectangle Grid.Column="2"
Visibility="Visible"
Fill="Blue"
HorizontalAlignment="center" Height="73" Stroke="Black" StrokeThickness="3" VerticalAlignment="Top" Width="1017" Margin="28,166,35,0"
/>
<Image HorizontalAlignment="Left" Height="102" VerticalAlignment="Top" Width="139" Margin="157,270,0,0"/>
<Button Content="Go Back" ClickMode="Press" Background="#FFE87E04" BorderBrush="#e87e04" FontSize="18" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Top" Width="174" Margin="157,1786,0,0" Height="61"/>
<Button Content="Continue" ClickMode="Press" Background="#e87e04" BorderBrush="#e87e04" FontSize="18" Foreground="white" HorizontalAlignment="Right" VerticalAlignment="Top" Width="160" Margin="0,1786,159,0" Height="61"/>
</Grid>
For more information on how to use grid in wpf .. please follow this links:
1) http://www.c-sharpcorner.com/UploadFile/1e050f/grid-layout-in-wpf/
2) http://www.wpf-tutorial.com/panels/grid-rows-and-columns/
3) https://wpftutorial.net/GridLayout.html
The problem is in the margin. Bottom margin is way too high and line goes out of the window
I guess you mistaken height with width and you ment Width="1920" Height="1080". Even so the actually height of the grid it would not be 1080, you can check it using this line
<Label Content="{Binding ElementName=grid,Path=ActualHeight}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="157,175,0,0" FontSize="30" FontWeight="DemiBold"/>
I am trying to implement splitview in my app.But when ii set IsPaneOpen = true;
My pivots are not moving to right of that split view pane.Insted SplitView Pane opens Over pivotItems.
Someone please help me to resolve this.
Thanks in advance.
My Main page:
<Page
x:Class="SplitView.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SplitView"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<RelativePanel x:Name="myrelativepanel">
<Pivot x:Name="mypivot" RelativePanel.AlignRightWith="spv">
<PivotItem x:Name="header1" Header="Header1">
<ListBox x:Name="listView"
HorizontalAlignment="Left"
Height="Auto"
VerticalAlignment="Top"
Width="172"
ItemsSource="{x:Bind itemsList}"
/>
</PivotItem>
<PivotItem x:Name="header2" Header="Header2">
<ListBox x:Name="listView1"
HorizontalAlignment="Left"
Height="Auto"
VerticalAlignment="Top"
Width="172"
ItemsSource="{x:Bind itemsList}"
/>
</PivotItem>
</Pivot>
<local:SplitViewPage x:Name="spv"></local:SplitViewPage>
</RelativePanel>
</Grid>
</Page>
My SplivView page:
<Page
x:Class="SplitView.SplitViewPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SplitView"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<SplitView x:Name="MySplitView" DisplayMode="CompactOverlay" IsPaneOpen="False"
CompactPaneLength="50" OpenPaneLength="150">
<SplitView.Pane>
<StackPanel Background="Gray">
<Button x:Name="HamburgerButton" FontFamily="Segoe MDL2 Assets" Content=""
Width="50" Height="50" Background="Transparent" Click="HamburgerButton_Click"/>
<StackPanel Orientation="Horizontal">
<Button x:Name="MenuButton1" FontFamily="Segoe MDL2 Assets" Content=""
Width="50" Height="50" Background="Transparent"/>
<TextBlock Text="Button 1" FontSize="18" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="MenuButton2" FontFamily="Segoe MDL2 Assets" Content=""
Width="50" Height="50" Background="Transparent"/>
<TextBlock Text="Button 2" FontSize="18" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="MenuButton3" FontFamily="Segoe MDL2 Assets" Content=""
Width="50" Height="50" Background="Transparent"/>
<TextBlock Text="Button 3" FontSize="18" VerticalAlignment="Center" />
</StackPanel>
</StackPanel>
</SplitView.Pane>
<SplitView.Content>
<Grid>
<TextBlock Text="SplitView Basic" FontSize="54" Foreground="White"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</SplitView.Content>
</SplitView>
</Page>
Use display mode CompactInline, instead of CompactOverlay on your splitview.
DisplayMode="CompactInline"
I have a problem with WPF... it's kinda odd.
I recently migrated to using MahApps.Metro for my window and when I'm on my Login Screen it flickers between cleartype and non-cleartype every few seconds
Here are my XAML files
MainWindow.xaml
<Controls:MetroWindow x:Class="LegendaryClient.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
Title="LegendaryClient" Height="600" Width="1024" MinHeight="600" MinWidth="1024"
ShowIconOnTitleBar="True" SaveWindowPosition="True" Icon="Icon.ico" ResizeMode="CanResizeWithGrip" TitleCaps="False">
<Controls:MetroWindow.WindowCommands>
<Controls:WindowCommands>
<Button Content="settings" />
<Button x:Name="ThemeButton" Click="ThemeButton_Click" Content="theme"/>
</Controls:WindowCommands>
</Controls:MetroWindow.WindowCommands>
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="Controls/Steel.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<ContentControl x:Name="Container" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Grid>
</Controls:MetroWindow>
and
<Page x:Class="LegendaryClient.Windows.LoginPage"
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:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
mc:Ignorable="d"
d:DesignHeight="672" d:DesignWidth="1024"
Title="LoginPage">
<Grid Background="Black" Margin="0">
<Image x:Name="LoginImage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="UniformToFill" Panel.ZIndex="-2" />
<Label x:Name="WelcomeLabel" Content="Login to League of Legends" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="24" FontWeight="Bold" Foreground="White" Margin="25,0,0,290">
<Label.Effect>
<DropShadowEffect ShadowDepth="3"/>
</Label.Effect>
</Label>
<Grid HorizontalAlignment="Left" Height="230" VerticalAlignment="Bottom" Width="350" Margin="20,0,0,50">
<Grid x:Name="LoginGrid" HorizontalAlignment="Left" Height="230" VerticalAlignment="Top" Width="350">
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Username" VerticalAlignment="Top" Foreground="White" Margin="10,10,0,0" FontSize="18" FontWeight="Bold"/>
<TextBox x:Name="LoginUsernameBox" TextWrapping="NoWrap" VerticalAlignment="Top" Width="330" HorizontalAlignment="Left" Margin="10,40,0,0" FontSize="16"/>
<CheckBox x:Name="RememberUsernameCheckbox" Content="Remember Username" HorizontalAlignment="Right" Margin="0,80,10,0" VerticalAlignment="Top" Foreground="White" IsChecked="True"/>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Password" VerticalAlignment="Top" Foreground="White" Margin="10,90,0,0" FontSize="18" FontWeight="Bold"/>
<PasswordBox x:Name="LoginPasswordBox" VerticalAlignment="Top" Width="330" HorizontalAlignment="Left" Margin="10,120,0,0" FontSize="16"/>
<CheckBox x:Name="RememberPasswordCheckbox" Content="Remember Password" HorizontalAlignment="Right" Margin="0,160,10,0" VerticalAlignment="Top" Foreground="White" />
<Button x:Name="LoginButton" Content="Login" HorizontalAlignment="Stretch" Margin="10,180,10,0" VerticalAlignment="Top" Height="41" Click="LoginButton_Click" IsDefault="True" />
<ComboBox x:Name="RegionComboBox" ItemsSource="{DynamicResource Regions}" HorizontalAlignment="Left" Margin="220,10,0,0" VerticalAlignment="Top" Width="120" SelectedIndex="5"/>
</Grid>
<Controls:ProgressRing x:Name="LoggingInProgressRing" IsActive="True" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,0" Visibility="Hidden"/>
<Label x:Name="LoggingInLabel" Content="Logging in..." HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="36" FontWeight="Bold" Foreground="White" Visibility="Hidden"/>
<Grid.Effect>
<DropShadowEffect/>
</Grid.Effect>
</Grid>
<TextBox x:Name="ErrorTextBox" Text="Error" HorizontalAlignment="Left" VerticalAlignment="Bottom" TextWrapping="NoWrap" IsReadOnly="True" Width="350" Height="20" FontSize="12" FontWeight="999" Foreground="#FFFF7373" Margin="25,0,0,15" Background="{x:Null}" Panel.ZIndex="-1" BorderBrush="{x:Null}" Visibility="Hidden">
<TextBox.Effect>
<DropShadowEffect ShadowDepth="3"/>
</TextBox.Effect>
</TextBox>
</Grid>
</Page>
Any help would be appreciated.
Thanks!
Turns out <Controls:ProgressRing x:Name="LoggingInProgressRing" IsActive="True" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,0" Visibility="Hidden"/> was causing my text to flicker for some reason... Putting it outside the grid stopped the blurring
I'm new in WPF and I'm trying to show an image in a WPF windows, and then show a button, and two links in a absulute coordinate. I have two problems:
The floating controls are moved from one computer to other
The image is blurred. I think that is being resized.
The form must be a fixed dialog, and the image size is 800x560.
Here is my code:
<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="A.B.C.IntroGuideWindow"
Title="Intro guide" Icon="../Resources/app_icon.ico"
Background="{DynamicResource DialogBackgroundBrush}" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
WindowStyle="None"
Style="{DynamicResource WindowStyle}" SnapsToDevicePixels="True" TextOptions.TextFormattingMode="Display" Width="830" Height="660">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../ResourceDictionaries/Colors.xaml"/>
<ResourceDictionary Source="../ResourceDictionaries/BasicStyles/StandardWindowStyle.xaml"/>
<ResourceDictionary Source="../ResourceDictionaries/ButtonStyles/ActionFlatButtonStyle.xaml"/>
<ResourceDictionary Source="../ResourceDictionaries/ButtonStyles/CancelButtonStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Margin="10,10,10,10" FontFamily="Segoe UI" FontSize="21"
FontWeight="SemiBold" Foreground="{DynamicResource FontBrush}" Grid.Row="0">
<Run Text="Intro guide" />
</TextBlock>
<Button x:Name="closeButton" Style="{DynamicResource CloseChromeButtonStyle}"
Click="CancelButton_Click" Grid.Row="0"
Content="r" HorizontalAlignment="Right" Margin="0,6,6,0" FontFamily="Webdings" IsTabStop="False" />
<Image x:Name="CurrentImage" Grid.Row="1" Width="800" Height="560" Stretch="None" Source="Images/sm-eval-guide-09.png" SnapsToDevicePixels="True"/>
<Button x:Name="OpenSamplesButton" Content="Click here to open the samples directory" IsDefault="False"
Style="{DynamicResource ActionFlatButtonStyle}"
Margin="256,115,265,434" Width="301" Height="23" Click="OpenSamplesButton_Click" Grid.Row="1"/>
<TextBlock x:Name="DocumentationLink" Margin="2,221,-2,333" Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" FontFamily="Arial" FontSize="14" FontWeight="Bold">
<Hyperlink Foreground="#00A586" NavigateUri="http://www.example.com/#documentation">http://www.example.com/#documentation</Hyperlink>
</TextBlock>
<TextBlock x:Name="TwitterLink" Margin="590,415,84,137" Grid.Row="1" VerticalAlignment="Center" FontFamily="Arial" FontSize="16" FontWeight="Bold">
<Hyperlink Foreground="#00A586" NavigateUri="https://twitter.com/xxx">#xxx</Hyperlink>
</TextBlock>
<Grid VerticalAlignment="Top" Grid.Row="2">
<Button x:Name="PreviousButton" Content="Previous" IsDefault="False"
Style="{DynamicResource ActionFlatButtonStyle}"
Margin="0,0,200,10" Width="90" HorizontalAlignment="Right" Click="PreviousButton_Click"/>
<Button x:Name="NextButton" Content="Next" IsDefault="True"
Style="{DynamicResource ActionFlatButtonStyle}"
Margin="0,0,105,10" Width="90" HorizontalAlignment="Right" Click="NextButton_Click"/>
<Button x:Name="CloseButton" Content="Close" IsDefault="False"
Style="{DynamicResource ActionFlatButtonStyle}"
Margin="0,0,10,10" Width="90"
VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="CloseButton_Click"/>
<CheckBox x:Name="DontShowAgainCheckbox" Content="Don't show this window again." HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Checked="DontShowAgainCheckbox_Checked"/>
</Grid>
</Grid>
</Window>
WPF adjusts for pixel density of the monitor it is running on. Consider using Grid Columns or other layout controls such as StackPanel instead of Margin offsets. For example, your buttons could use the following layout:
<StackPanel Orientation="Horizontal" Margin="10,0" HorizontalAlignment="Right">
<Button x:Name="PreviousButton" Content="Previous" IsDefault="False"
Style="{DynamicResource ActionFlatButtonStyle}" Margin="4,0"
Width="90" Click="PreviousButton_Click"/>
<Button x:Name="NextButton" Content="Next" IsDefault="True"
Style="{DynamicResource ActionFlatButtonStyle}" Margin="4,0"
Width="90" Click="NextButton_Click"/>
<Button x:Name="CloseButton" Content="Close" IsDefault="False"
Style="{DynamicResource ActionFlatButtonStyle}" Margin="4,0"
Width="90" Click="CloseButton_Click"/>
</StackPanel>
For the blurred image, try using UseLayoutRounding="False" in your Image definition.