C
C#8mo ago
SirDurpsalot

Adding a picture to a button in a style for a window

So I have a style resource dictionary that cam from a different project. There they made a style for a window with custom buttons and title bar. For the buttons they used images that were saved in the project in a folder. When I try to add this resource dictionary to my own project and added it to app.xaml everything works except the pictures in the buttons. Could someone please tell me why this doesnt work for me? ( I am still a beginner at this so it might something simple I just don't know) the (I removed a lot of the code but I left the top part so you can get an idea of what the structure is. You can find the full code in the pastbind below)
<Setter>
<Setter.Value>
<ControlTemplate>
<Border>
<Grid>
<Grid>
<Stackpanel>
<Button Style="{StaticResource Windows95CaptionButton}"
x:Name="PART_MinimizeButton">
<Button.Content>
<Image Height="14"
Width="16"
SnapsToDevicePixels="True"
Source="../Images/close.png" />
</Button.Content>
</Button>
<Setter>
<Setter.Value>
<ControlTemplate>
<Border>
<Grid>
<Grid>
<Stackpanel>
<Button Style="{StaticResource Windows95CaptionButton}"
x:Name="PART_MinimizeButton">
<Button.Content>
<Image Height="14"
Width="16"
SnapsToDevicePixels="True"
Source="../Images/close.png" />
</Button.Content>
</Button>
thanks in advance! https://pastebin.com/uFQP80Hx And the full project where I took this code from: https://github.com/vddCore/Windows95-WPF/tree/master
Pastebin
window style with buttons - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
GitHub
GitHub - vddCore/Windows95-WPF: Windows 95 styled controls and Welc...
Windows 95 styled controls and Welcome window replica made with WPF. - vddCore/Windows95-WPF
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server