Skip to content

Commit

Permalink
Merge pull request #24 from Panda-Sharp/develop
Browse files Browse the repository at this point in the history
Add teaching tip events to runtime directives
  • Loading branch information
Panda-Sharp authored Aug 20, 2021
2 parents 13a7d6e + 2254fdf commit 8c462d3
Show file tree
Hide file tree
Showing 55 changed files with 25 additions and 15 deletions.
Binary file modified Yugen.Mosaic.Uwp/Assets/LargeTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/LargeTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/LargeTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/LargeTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/LargeTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SmallTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SmallTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SmallTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SmallTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SmallTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SplashScreen.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SplashScreen.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SplashScreen.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/SplashScreen.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/Square150x150Logo.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/Square150x150Logo.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/Square150x150Logo.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/Square150x150Logo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.scale-100.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.scale-125.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.scale-150.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.scale-200.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.scale-400.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.targetsize-16.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.targetsize-24.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.targetsize-256.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.targetsize-32.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Square44x44Logo.targetsize-48.png
Binary file added Yugen.Mosaic.Uwp/Assets/Store/Screenshots/04.png
Binary file added Yugen.Mosaic.Uwp/Assets/Store/Screenshots/14.png
Binary file modified Yugen.Mosaic.Uwp/Assets/StoreLogo.scale-100.png
Binary file modified Yugen.Mosaic.Uwp/Assets/StoreLogo.scale-125.png
Binary file modified Yugen.Mosaic.Uwp/Assets/StoreLogo.scale-150.png
Binary file modified Yugen.Mosaic.Uwp/Assets/StoreLogo.scale-200.png
Binary file modified Yugen.Mosaic.Uwp/Assets/StoreLogo.scale-400.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Wide310x150Logo.scale-100.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Wide310x150Logo.scale-125.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Wide310x150Logo.scale-150.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Wide310x150Logo.scale-200.png
Binary file modified Yugen.Mosaic.Uwp/Assets/Wide310x150Logo.scale-400.png
22 changes: 17 additions & 5 deletions Yugen.Mosaic.Uwp/Properties/Default.rd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,25 @@
-->

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

<!-- Add your application specific runtime directives here. -->
</Application>
<!-- Add your application specific runtime directives here. -->
<!--<Type Name="Microsoft.UI.Xaml.Controls.TeachingTip.Closed" Dynamic="Required Public"/>-->
<!--<Type Name="Microsoft.UI.Xaml.Controls.ItemInvoked" Browse="Required Public"/>-->

<Type Name="Windows.Foundation.TypedEventHandler{Microsoft.UI.Xaml.Controls.TeachingTip,Microsoft.UI.Xaml.Controls.TeachingTipClosedEventArgs}" MarshalObject="Public" />
<Type Name="Microsoft.UI.Xaml.Controls.TeachingTip">
<Event Name="Closed" Dynamic="Required"/>
</Type>

<Type Name="Windows.Foundation.TypedEventHandler{Microsoft.UI.Xaml.Controls.TeachingTip,Microsoft.UI.Xaml.Controls.TeachingTipClosingEventArgs}" MarshalObject="Public" />
<Type Name="Microsoft.UI.Xaml.Controls.TeachingTip">
<Event Name="Closing" Dynamic="Required"/>
</Type>
</Application>
</Directives>
12 changes: 6 additions & 6 deletions Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public MainViewModel(IMosaicService mosaicService, IProgressService progressServ
WhatsNewCommand = new AsyncRelayCommand(WhatsNewCommandBehavior);
SettingsCommand = new AsyncRelayCommand(SettingsCommandBehavior);
TeachingTipActionButtonCommand = new RelayCommand(TeachingTipActionButtonCommandBehavior);
//TeachingTipClosingCommand = new RelayCommand(TeachingTipClosingCommandBehavior);
//TeachingTipClosedCommand = new RelayCommand(TeachingTipClosedCommandBehavior);
TeachingTipClosingCommand = new RelayCommand(TeachingTipClosingCommandBehavior);
TeachingTipClosedCommand = new RelayCommand(TeachingTipClosedCommandBehavior);
}

public bool IsAddMasterUIVisible
Expand Down Expand Up @@ -238,9 +238,9 @@ public int Progress

public ICommand TeachingTipActionButtonCommand { get; }

//public ICommand TeachingTipClosingCommand { get; }
public ICommand TeachingTipClosingCommand { get; }

//public ICommand TeachingTipClosedCommand { get; }
public ICommand TeachingTipClosedCommand { get; }

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

Expand Down Expand Up @@ -277,15 +277,15 @@ public void TeachingTipActionButtonCommandBehavior()
IsTeachingTipOpen = false;
}

public void TeachingTip_Closing(TeachingTip sender, TeachingTipClosingEventArgs args)
public void TeachingTipClosingCommandBehavior()
{
TeachingTipTitle = "";
TeachingTipSubTitle = "";
TeachingTipTarget = null;
IsTeachingTipOpen = false;
}

public void TeachingTip_Closed(TeachingTip sender, TeachingTipClosedEventArgs args) => ShowTeachingTip();
public void TeachingTipClosedCommandBehavior() => ShowTeachingTip();

private async Task AddMasterImageCommandBehavior()
{
Expand Down
6 changes: 2 additions & 4 deletions Yugen.Mosaic.Uwp/Views/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -424,21 +424,19 @@
</Grid>

<muxc:TeachingTip x:Uid="MainTeachingTip"
Closing="{x:Bind ViewModel.TeachingTip_Closing}"
Closed="{x:Bind ViewModel.TeachingTip_Closed}"
IsOpen="{x:Bind ViewModel.IsTeachingTipOpen, Mode=OneWay}"
Target="{x:Bind ViewModel.TeachingTipTarget, Mode=OneWay}"
Title="{x:Bind ViewModel.TeachingTipTitle, Mode=OneWay}"
Subtitle="{x:Bind ViewModel.TeachingTipSubTitle, Mode=OneWay}"
ActionButtonCommand="{x:Bind ViewModel.TeachingTipActionButtonCommand}">
<!--<interactivity:Interaction.Behaviors>
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Closed">
<core:InvokeCommandAction Command="{x:Bind ViewModel.TeachingTipClosedCommand}" />
</core:EventTriggerBehavior>
<core:EventTriggerBehavior EventName="Closing">
<core:InvokeCommandAction Command="{x:Bind ViewModel.TeachingTipClosingCommand}" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>-->
</interactivity:Interaction.Behaviors>
</muxc:TeachingTip>
</Grid>
</Page>

0 comments on commit 8c462d3

Please sign in to comment.