Skip to content

Commit 2254fdf

Browse files
committed
Add teaching tip events to runtime directives
Update visual assets
1 parent cd8c1ab commit 2254fdf

File tree

55 files changed

+25
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+25
-15
lines changed
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes

Yugen.Mosaic.Uwp/Properties/Default.rd.xml

+17-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,25 @@
1616
-->
1717

1818
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
19-
<Application>
20-
<!--
19+
<Application>
20+
<!--
2121
An Assembly element with Name="*Application*" applies to all assemblies in
2222
the application package. The asterisks are not wildcards.
2323
-->
24-
<Assembly Name="*Application*" Dynamic="Required All" />
24+
<Assembly Name="*Application*" Dynamic="Required All" />
2525

26-
<!-- Add your application specific runtime directives here. -->
27-
</Application>
26+
<!-- Add your application specific runtime directives here. -->
27+
<!--<Type Name="Microsoft.UI.Xaml.Controls.TeachingTip.Closed" Dynamic="Required Public"/>-->
28+
<!--<Type Name="Microsoft.UI.Xaml.Controls.ItemInvoked" Browse="Required Public"/>-->
29+
30+
<Type Name="Windows.Foundation.TypedEventHandler{Microsoft.UI.Xaml.Controls.TeachingTip,Microsoft.UI.Xaml.Controls.TeachingTipClosedEventArgs}" MarshalObject="Public" />
31+
<Type Name="Microsoft.UI.Xaml.Controls.TeachingTip">
32+
<Event Name="Closed" Dynamic="Required"/>
33+
</Type>
34+
35+
<Type Name="Windows.Foundation.TypedEventHandler{Microsoft.UI.Xaml.Controls.TeachingTip,Microsoft.UI.Xaml.Controls.TeachingTipClosingEventArgs}" MarshalObject="Public" />
36+
<Type Name="Microsoft.UI.Xaml.Controls.TeachingTip">
37+
<Event Name="Closing" Dynamic="Required"/>
38+
</Type>
39+
</Application>
2840
</Directives>

Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public MainViewModel(IMosaicService mosaicService, IProgressService progressServ
7777
WhatsNewCommand = new AsyncRelayCommand(WhatsNewCommandBehavior);
7878
SettingsCommand = new AsyncRelayCommand(SettingsCommandBehavior);
7979
TeachingTipActionButtonCommand = new RelayCommand(TeachingTipActionButtonCommandBehavior);
80-
//TeachingTipClosingCommand = new RelayCommand(TeachingTipClosingCommandBehavior);
81-
//TeachingTipClosedCommand = new RelayCommand(TeachingTipClosedCommandBehavior);
80+
TeachingTipClosingCommand = new RelayCommand(TeachingTipClosingCommandBehavior);
81+
TeachingTipClosedCommand = new RelayCommand(TeachingTipClosedCommandBehavior);
8282
}
8383

8484
public bool IsAddMasterUIVisible
@@ -238,9 +238,9 @@ public int Progress
238238

239239
public ICommand TeachingTipActionButtonCommand { get; }
240240

241-
//public ICommand TeachingTipClosingCommand { get; }
241+
public ICommand TeachingTipClosingCommand { get; }
242242

243-
//public ICommand TeachingTipClosedCommand { get; }
243+
public ICommand TeachingTipClosedCommand { get; }
244244

245245
private Size OutputSize => new Size(_outputWidth, _outputHeight);
246246

@@ -277,15 +277,15 @@ public void TeachingTipActionButtonCommandBehavior()
277277
IsTeachingTipOpen = false;
278278
}
279279

280-
public void TeachingTip_Closing(TeachingTip sender, TeachingTipClosingEventArgs args)
280+
public void TeachingTipClosingCommandBehavior()
281281
{
282282
TeachingTipTitle = "";
283283
TeachingTipSubTitle = "";
284284
TeachingTipTarget = null;
285285
IsTeachingTipOpen = false;
286286
}
287287

288-
public void TeachingTip_Closed(TeachingTip sender, TeachingTipClosedEventArgs args) => ShowTeachingTip();
288+
public void TeachingTipClosedCommandBehavior() => ShowTeachingTip();
289289

290290
private async Task AddMasterImageCommandBehavior()
291291
{

Yugen.Mosaic.Uwp/Views/MainPage.xaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -424,21 +424,19 @@
424424
</Grid>
425425

426426
<muxc:TeachingTip x:Uid="MainTeachingTip"
427-
Closing="{x:Bind ViewModel.TeachingTip_Closing}"
428-
Closed="{x:Bind ViewModel.TeachingTip_Closed}"
429427
IsOpen="{x:Bind ViewModel.IsTeachingTipOpen, Mode=OneWay}"
430428
Target="{x:Bind ViewModel.TeachingTipTarget, Mode=OneWay}"
431429
Title="{x:Bind ViewModel.TeachingTipTitle, Mode=OneWay}"
432430
Subtitle="{x:Bind ViewModel.TeachingTipSubTitle, Mode=OneWay}"
433431
ActionButtonCommand="{x:Bind ViewModel.TeachingTipActionButtonCommand}">
434-
<!--<interactivity:Interaction.Behaviors>
432+
<interactivity:Interaction.Behaviors>
435433
<core:EventTriggerBehavior EventName="Closed">
436434
<core:InvokeCommandAction Command="{x:Bind ViewModel.TeachingTipClosedCommand}" />
437435
</core:EventTriggerBehavior>
438436
<core:EventTriggerBehavior EventName="Closing">
439437
<core:InvokeCommandAction Command="{x:Bind ViewModel.TeachingTipClosingCommand}" />
440438
</core:EventTriggerBehavior>
441-
</interactivity:Interaction.Behaviors>-->
439+
</interactivity:Interaction.Behaviors>
442440
</muxc:TeachingTip>
443441
</Grid>
444442
</Page>

0 commit comments

Comments
 (0)