isPopupShowing = false;
ShowOptionMenu(false);
+ View.Focus();
};
popup.Show(this.View, this.View.Width / 2, this.View.Height - height144);
set { SetValue(SortOptionIndexCommandProperty, value); }
}
+ public ICommand ChangeBackKeyInfoCommand { get; set; }
+
/// <summary>
/// A constructor
/// </summary>
};
popup.Items.Add(new ContextPopupItem("PIN"));
- popup.Items.Add(new ContextPopupItem(" DELETE "));
+ popup.Items.Add(new ContextPopupItem(" DELETE "));
//TODO: need to change the event callback
popup.SelectedIndexChanged += (s, args) =>
popup.Dismissed += (s, args) =>
{
isPopupShowing = false;
+ ChangeBackKeyInfoCommand?.Execute(isPopupShowing);
};
View anchor = sender as View;
popup.Show(anchor, anchor.Width/2, 0);
isPopupShowing = true;
+ ChangeBackKeyInfoCommand?.Execute(isPopupShowing);
}
}
}
private DropdownList sortList;
private Button doneButton;
private Button cancelButton;
+ private bool isShowOptions = false;
/// <summary>
/// SubPanel icon's transition height value when it focused.
animation.Add(0.2, 0.8, appListAnimation);
animation.Add(0.2, 1, mainAnimation);
- animation.Commit(this, "QuitAnimation", 16, 834);
+ animation.Commit(this, "QuitAnimation", 16, 834, null, (v, s) => AppControlUtils.SelfTerminate());
}
MakeFocusChaining();
AppList.InitializeFocus();
});
+
+ FooterNormal.ChangeBackKeyInfoCommand = new Command<bool>((isShowingPopup) =>
+ {
+ if (isShowingPopup)
+ {
+ BackKeyInfo.Text = "Front";
+ }
+ else
+ {
+ BackKeyInfo.Text = "Quit";
+ }
+ });
}
protected override async void OnAppearing()
FooterPin.additionalInfo.IsVisible = false;
FooterDelete.IsVisible = false;
BackKeyInfo.Text = "Quit";
- AppList.InitializeFocus();
+ if (isShowOptions)
+ {
+ isShowOptions = false;
+ }
+ else
+ {
+ AppList.InitializeFocus();
+ }
break;
case AppsStatus.Pin:
FooterNormal.IsVisible = false;
if (answer)
{
PlayHideAnimation();
- await Task.Delay(800);
- AppControlUtils.SelfTerminate();
}
else
{
public ICommand OnDefaultModeCommand { get; set; }
+ public ICommand OnShowOptionsCommand { get; set; }
+
/// <summary>
/// Handles Button Focused event
/// </summary>
{
OnDefaultModeCommand.Execute("");
}
+ else if (ctxPopup.SelectedIndex == 1)
+ {
+ OnShowOptionsCommand?.Execute(isShowOptions);
+ }
};
popup.Show(View, View.Width / 2, View.Height - (moveTransitionHeight + selectTransitionHeight));
{
if (!isDefault)
{
- View.TranslateTo(SizeUtils.GetWidthSize((int)View.TranslationX), 0, 300);
+ await View.TranslateTo(SizeUtils.GetWidthSize((int)View.TranslationX), 0, 300);
}
else
{
await View.TranslateTo(0, SizeUtils.GetHeightSize((int)View.TranslationY), 0);
- View.TranslateTo(0, 0, 300);
+ await View.TranslateTo(0, 0, 300);
}
OnFocused(null, null);
}
+
+ OnShowOptionsCommand?.Execute(moveMode);
#pragma warning restore CS4014
}
else
{
await View.TranslateTo(0, 0, 300);
+ OnFocused(null, null);
}
+
+ OnShowOptionsCommand?.Execute(showOptions);
}
/// <summary>
public override async void OnFocused(object sender, FocusEventArgs e)
{
isFocused = true;
- if (isMoveMode)
+ if (isMoveMode || isShowOptions)
{
return;
}
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Views="clr-namespace:TVHome.Views"
x:Class="TVHome.Views.MainPanel">
- <!-- TODO : Grid.ColumnSpacing should be -94 after taking Focus managemant -->
<Grid x:Name="PanelButtonGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="{Binding MainPanelIconWidth}" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
- <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
+ <Grid.ColumnSpacing>-94</Grid.ColumnSpacing>
</Grid>
</Views:Panel>
\ No newline at end of file
{
OnMoveVMCommand.Execute(ButtonViewList);
}
-
- OnShowOptionsCommand.Execute(isMoveMode);
});
}
button.OnUnpinCommand = new Command(() =>
{
AppShortcutInfo shortcut = (AppShortcutInfo)button.View.BindingContext;
- OnUnpinVMCommand.Execute(shortcut.AppID);
+ OnUnpinVMCommand?.Execute(shortcut.AppID);
});
button.OnDefaultModeCommand = new Command(() =>
{
ChangeToDefaultMode();
});
+ button.OnShowOptionsCommand = new Command<bool>((param) =>
+ {
+ OnShowOptionsCommand?.Execute(param);
+ });
PanelButtonStack.Children.Add(button.View);
ButtonViewList.Add(button.View);
{
ButtonViewList.Add(stackItem);
}
-
- OnShowOptionsCommand.Execute(isMoveMode);
}
else if (isShowOptions)
{
ChangeIsEnabledProperty(item.View, true);
}
}
-
- OnShowOptionsCommand?.Execute(isShowOptions);
}
}