Click here to Skip to main content
15,883,938 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Simpliest code doesn't work Pin
Bernhard Hiller2-Sep-18 22:03
Bernhard Hiller2-Sep-18 22:03 
GeneralRe: Simpliest code doesn't work Pin
Pew_new2-Sep-18 23:10
Pew_new2-Sep-18 23:10 
GeneralRe: Simpliest code doesn't work Pin
Richard Deeming3-Sep-18 10:32
mveRichard Deeming3-Sep-18 10:32 
QuestionWPF: Customizing the appearence of a window n XAML Pin
Pew_new28-Aug-18 21:30
Pew_new28-Aug-18 21:30 
AnswerRe: WPF: Customizing the appearence of a window n XAML Pin
OriginalGriff28-Aug-18 21:32
mveOriginalGriff28-Aug-18 21:32 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 0:55
Pew_new29-Aug-18 0:55 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
OriginalGriff29-Aug-18 1:04
mveOriginalGriff29-Aug-18 1:04 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 3:07
Pew_new29-Aug-18 3:07 
Here's my App.xaml
<Application x:Class="WPF_WindowStyle.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:WPF_WindowStyle"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <Style x:Key="CustomWindow" TargetType="{x:Type Window}">
            <Setter Property="WindowStyle" Value="None"/>
            <Setter Property="AllowsTransparency" Value="True"/>
            <Setter Property="MinWidth" Value="100"/>
            <Setter Property="MinHeight" Value="46"/>
            <!--CaptionHeight + ResizeBorderThickness * 2-->
            <Setter Property="Background" Value="Yellow"/>
            <Setter Property="BorderBrush" Value="Green"/>
            <Setter Property="BorderThickness" Value="5"/>
            <Setter Property="Foreground" Value="DarkRed"/>
            <Setter Property="Template" Value="{StaticResource WindowTemplate}"/>
        </Style>

    </Application.Resources>
</Application>


Here's my MainWindow.xaml

HTML
<Window x:Class="WPF_WindowStyle.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:WPF_WindowStyle"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525" Style="{StaticResource RedWindow}">
    <Grid>
        
    </Grid>
</Window>


I've got a fail in MainWindow.xaml where Style="{StaticResource RedWindow}" is highlighted in red.
I understand that I have no RedWindow resource at all. However, what I need to do in this case.
Thanks in advance!
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Richard Deeming29-Aug-18 3:52
mveRichard Deeming29-Aug-18 3:52 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 4:03
Pew_new29-Aug-18 4:03 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Richard Deeming29-Aug-18 4:09
mveRichard Deeming29-Aug-18 4:09 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 4:31
Pew_new29-Aug-18 4:31 
SuggestionRe: WPF: Customizing the appearence of a window n XAML Pin
Richard Deeming29-Aug-18 2:56
mveRichard Deeming29-Aug-18 2:56 
GeneralRe: WPF: Customizing the appearence of a window n XAML Pin
Pew_new29-Aug-18 3:12
Pew_new29-Aug-18 3:12 
QuestionWPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new21-Aug-18 5:13
Pew_new21-Aug-18 5:13 
AnswerRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming21-Aug-18 9:59
mveRichard Deeming21-Aug-18 9:59 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new21-Aug-18 22:02
Pew_new21-Aug-18 22:02 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming22-Aug-18 2:21
mveRichard Deeming22-Aug-18 2:21 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new23-Aug-18 0:41
Pew_new23-Aug-18 0:41 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming23-Aug-18 8:15
mveRichard Deeming23-Aug-18 8:15 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new23-Aug-18 8:34
Pew_new23-Aug-18 8:34 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming23-Aug-18 8:39
mveRichard Deeming23-Aug-18 8:39 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new23-Aug-18 8:52
Pew_new23-Aug-18 8:52 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Richard Deeming23-Aug-18 9:05
mveRichard Deeming23-Aug-18 9:05 
GeneralRe: WPF: Can't get what I need to do to get things right (responsive controls). Pin
Pew_new24-Aug-18 3:09
Pew_new24-Aug-18 3:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.