mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-08 23:43:29 +02:00
Restore WPF .NET Framework content from WPF .NET (#144)
* Copy .NET 5 WPF content back into .NET Framework * Add H1 heading difference for .NET * Fix validation errors
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
<Application x:Class="Application"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:IntroToStylingAndTemplating"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
Class Application
|
||||
|
||||
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
|
||||
' can be handled in this file.
|
||||
|
||||
End Class
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<Window x:Class="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:IntroToStylingAndTemplating"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800" Loaded="Window_Loaded">
|
||||
<Window.Resources>
|
||||
<!-- .... other resources .... -->
|
||||
|
||||
<!--A Style that extends the previous TextBlock Style-->
|
||||
<!--This is a "named style" with an x:Key of TitleText-->
|
||||
<Style BasedOn="{StaticResource {x:Type TextBlock}}"
|
||||
TargetType="TextBlock"
|
||||
x:Key="TitleText">
|
||||
<Setter Property="FontSize" Value="26"/>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
||||
<LinearGradientBrush.GradientStops>
|
||||
<GradientStop Offset="0.0" Color="#90DDDD" />
|
||||
<GradientStop Offset="1.0" Color="#5BFFFF" />
|
||||
</LinearGradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<TextBlock Name="textblock1">My Pictures</TextBlock>
|
||||
</Grid>
|
||||
</Window>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
Class MainWindow
|
||||
Private Sub Window_Loaded(sender As Object, e As Windows.RoutedEventArgs)
|
||||
'<SnippetSetStyleCode>
|
||||
textblock1.Style = CType(Resources("TitleText"), Windows.Style)
|
||||
'</SnippetSetStyleCode>
|
||||
End Sub
|
||||
End Class
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
' <PhotoClass>
|
||||
Public Class Photo
|
||||
Sub New(ByVal path As String)
|
||||
Source = path
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property Source As String
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return Source
|
||||
End Function
|
||||
End Class
|
||||
' </PhotoClass>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<RootNamespace>IntroToStylingAndTemplating</RootNamespace>
|
||||
<UseWpf>true</UseWpf>
|
||||
<AssemblyName>IntroToStylingAndTemplating</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user