This project is read-only.

Optimized Touch App with Modern UI

Jul 9, 2013 at 11:50 AM
Hello,

Does anyone know how I can optimize Modern UI for a good Touch App.

So it should be possible to create bigger buttons (Link, BackButton, CloseButton, MinimizeButton, MenuItems and Headers).

How can I realize this in a simple way.

Thanks,
Jul 11, 2013 at 4:41 PM
this is my way what i think last week
but i still got trouble ..
public class BigFormatCommand : ICommand
{

    public static readonly RoutedEvent ExecuteEvent = EventManager.RegisterRoutedEvent("ExecuteEvent", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BigFormatCommand));

    public static void AddExecuteHandler(DependencyObject o, RoutedEventHandler handler)
    {
        ((UIElement)o).AddHandler(BigFormatCommand.ExecuteEvent, handler);

    }
    public static void RemoveExecuteHandler(DependencyObject o, RoutedEventHandler handler)
    {
        ((UIElement)o).RemoveHandler(BigFormatCommand.ExecuteEvent, handler);

    }



    public bool CanExecute(object parameter)
    {
        return true;
    }

    public event EventHandler CanExecuteChanged;

    public void Execute(object parameter)
    {
        //Application.Current.Shutdown();
        RoutedEventArgs e = new RoutedEventArgs(ExecuteEvent, Keyboard.FocusedElement);
        Keyboard.FocusedElement.RaiseEvent(e);
    }
}
and in Main window:
<mui:ModernWindow.FrameTopContent>
    <Button Content="FontSize" Width="200" Command="{x:Static uiSample:AppCommands.BigFormatCommand}"/>
</mui:ModernWindow.FrameTopContent>
Trouble:
Only the User control content becomes Big !?? but the Linkgroups are not changed size?? why???