Add article, code projects, toc, and redirects (#1180)

Co-authored-by: Andy (Steve) De George <[email protected]>
This commit is contained in:
Tris Shores
2021-10-22 11:09:30 -07:00
committed by GitHub
co-authored by Andy De George
parent 4f0101b05c
commit cdf2334a60
18 changed files with 414 additions and 4 deletions
@@ -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:CodeSampleVb"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
@@ -0,0 +1,6 @@
Class Application
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
End Class
@@ -0,0 +1,11 @@
Imports System.Windows
'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
'1st parameter: where theme specific resource dictionaries are located
'(used if a resource is not found in the page,
' or application resource dictionaries)
'2nd parameter: where the generic resource dictionary is located
'(used if a resource is not found in the page,
'app, and any theme specific resource dictionaries)
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<RootNamespace>CodeSampleVb</RootNamespace>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<Import Include="System.Windows" />
<Import Include="System.Windows.Controls" />
<Import Include="System.Windows.Data" />
<Import Include="System.Windows.Documents" />
<Import Include="System.Windows.Input" />
<Import Include="System.Windows.Media" />
<Import Include="System.Windows.Media.Imaging" />
<Import Include="System.Windows.Navigation" />
<Import Include="System.Windows.Shapes" />
</ItemGroup>
</Project>
@@ -0,0 +1,3 @@
<Window x:Class="CodeSampleVb.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />
@@ -0,0 +1,32 @@
Namespace CodeSampleVb
Partial Public Class MainWindow
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
' <DefineDependencyProperty>
Public Class Aquarium
Inherits DependencyObject
Public Shared ReadOnly HasFishProperty As DependencyProperty =
DependencyProperty.Register(
name:="HasFish",
propertyType:=GetType(Boolean),
ownerType:=GetType(Aquarium),
typeMetadata:=New FrameworkPropertyMetadata(defaultValue:=False))
Public Property HasFish As Boolean
Get
Return GetValue(HasFishProperty)
End Get
Set(value As Boolean)
SetValue(HasFishProperty, value)
End Set
End Property
End Class
' </DefineDependencyProperty>
End Class
End Namespace