I created my resource dictionary and can access styles in it, but how (If possible) would I reference an entire control from it?
Here's the resourcedictionary:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="MainWindowStyle" TargetType="Window">
<Setter Property="Background" Value="Transparent"></Setter>
<!--Can access this-->
</Style>
<Window x:Key="CustomWindow" Background="Transparent">
<!--Want to access this-->
</Window>
</ResourceDictionary>
Here's the main window xaml file:
<Window x:Class="MyNamespace.MyWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="640" Width="960" >
<!--setting Style={StaticResource MainWindowStyle} adds the style but I want this window to be replaced by the one in the resourcedictionary-->
<Grid>
</Grid>
</Window>
So I basically want to replace the window in the xaml file with the one created in the resource dictionary.