Universal Windows 10 - How to add button in title bar like Microsoft Edge? -
i use extend view titlebar this:
coreapplication.getcurrentview().titlebar.extendviewintotitlebar = true;
and xaml code is:
<page x:class="projectx.mainpage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:projectx" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d"> <grid background="{themeresource applicationpagebackgroundthemebrush}"> <grid background="#263238" height="32" verticalalignment="top" requestedtheme="dark"> <textblock text="title bar" verticalalignment="center" horizontalalignment="center"/> <button width="50" height="32" click="button_click"/> </grid> <textblock x:name="txttest" text="aaaaaaaaaa" horizontalalignment="center" verticalalignment="center" foreground="black"/> </grid>
button can't click. me!
you can add button
using windows.ui.core; var currentview = systemnavigationmanager.getforcurrentview(); currentview.appviewbackbuttonvisibility = appviewbackbuttonvisibility.visible;
Comments
Post a Comment