-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathBubblleControlExample.xaml
More file actions
116 lines (115 loc) · 6.11 KB
/
BubblleControlExample.xaml
File metadata and controls
116 lines (115 loc) · 6.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<UserControl
x:Class="WPFDevelopers.Samples.ExampleViews.BubblleControlExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<controls:CodeViewer Header="{Binding NavigateMenuItem.Name}">
<TabControl TabStripPlacement="Bottom">
<TabItem Header="随机">
<controls:BubblleControl x:Name="MyBubblleControl" Click="BubblleControl_Click">
<controls:BubblleControl.ItemsSource>
<x:Array Type="sys:String">
<sys:String>WPF</sys:String>
<sys:String>ASP.NET</sys:String>
<sys:String>WinUI</sys:String>
<sys:String>WebAPI</sys:String>
<sys:String>Blazor</sys:String>
<sys:String>MAUI</sys:String>
<sys:String>Xamarin</sys:String>
<sys:String>WinForm</sys:String>
<sys:String>UWP</sys:String>
</x:Array>
</controls:BubblleControl.ItemsSource>
</controls:BubblleControl>
</TabItem>
<TabItem Header="自定义">
<controls:BubblleCanvas Width="400" Height="400">
<Grid>
<Grid Width="60" Height="60">
<Ellipse Fill="MediumSpringGreen" Opacity=".4" />
<Ellipse Stroke="MediumSpringGreen" StrokeThickness=".8" />
</Grid>
<TextBlock
Padding="10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Hyperlink
Command="{Binding ClickCommand, RelativeSource={RelativeSource AncestorType=local:BubblleControlExample}}"
FontWeight="Normal"
Foreground="MediumSpringGreen">
<TextBlock
Text="WPF"
TextAlignment="Center"
TextTrimming="CharacterEllipsis" />
</Hyperlink>
</TextBlock>
</Grid>
<Grid>
<Grid Width="60" Height="60">
<Ellipse Fill="Brown" Opacity=".4" />
<Ellipse Stroke="Brown" StrokeThickness=".8" />
</Grid>
<TextBlock
Padding="10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Hyperlink
Command="{Binding ClickCommand, RelativeSource={RelativeSource AncestorType=local:BubblleControlExample}}"
FontWeight="Normal"
Foreground="Brown">
<TextBlock
Text="MAUI"
TextAlignment="Center"
TextTrimming="CharacterEllipsis" />
</Hyperlink>
</TextBlock>
</Grid>
<Grid>
<Grid Width="60" Height="60">
<Ellipse Fill="DeepSkyBlue" Opacity=".4" />
<Ellipse Stroke="DeepSkyBlue" StrokeThickness=".8" />
</Grid>
<TextBlock
Padding="10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Hyperlink
Command="{Binding ClickCommand, RelativeSource={RelativeSource AncestorType=local:BubblleControlExample}}"
FontWeight="Normal"
Foreground="DeepSkyBlue">
<TextBlock
Text="Blazor"
TextAlignment="Center"
TextTrimming="CharacterEllipsis" />
</Hyperlink>
</TextBlock>
</Grid>
</controls:BubblleCanvas>
</TabItem>
</TabControl>
<controls:CodeViewer.SourceCodes>
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/BubblleControlExample.xaml" CodeType="Xaml" />
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/BubblleControlExample.xaml.cs" CodeType="CSharp" />
<controls:SourceCodeModel
CodeSource="/WPFDevelopers.SamplesCode;component/Controls/BubblleControl/BubblleControl.cs"
CodeType="CSharp"
Haader="BubblleControl.cs" />
<controls:SourceCodeModel
CodeSource="/WPFDevelopers.SamplesCode;component/Controls/BubblleControl/BubblleCanvas.cs"
CodeType="CSharp"
Haader="BubblleCanvas.cs" />
<controls:SourceCodeModel
CodeSource="/WPFDevelopers.SamplesCode;component/Controls/BubblleControl/BubblleControl.xaml"
CodeType="Xaml"
Haader="BubblleControl.xaml" />
</controls:CodeViewer.SourceCodes>
</controls:CodeViewer>
</UserControl>