xaml - How to show custom dialog from Callisto WinRT toolkit? -
my question that. how should show customdialog control callisto toolkit? have following xaml:
<controls:layoutawarepage x:name="pageroot" x:class="heronclientwindowsstore.views.suggesteventdialogpage" datacontext="{binding defaultviewmodel, relativesource={relativesource self}}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:heronclientwindowsstore.views" xmlns:controls="using:heronclientwindowsstore.controls" xmlns:callisto="using:callisto.controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d"> <page.resources> </page.resources> <callisto:customdialog x:fieldmodifier="public" x:name="suggesteventdialog" width="300" height="500" title="suggest event" background="teal" backbuttonvisibility="visible"> <stackpanel> <textblock margin="0,0,0,8" text="suggest event should added heron." fontsize="14.6667" fontweight="semilight" textwrapping="wrap" /> <textblock margin="0,0,0,8" fontsize="14.6667" fontweight="semilight" text="event url" /> <callisto:watermarktextbox horizontalalignment="left" watermark="http://www.example.com" width="400" height="35" /> <stackpanel margin="0,20,0,0" horizontalalignment="right" orientation="horizontal"> <button content="ok" width="90" margin="0,0,20,0" /> <button content="cancel" width="90" /> </stackpanel> </stackpanel> </callisto:customdialog>
it doesn't show , can't see method triggering it.
you have use isopen
property open dialog.
i pasting here working code me.
xaml
<grid background="{staticresource applicationpagebackgroundthemebrush}"> <button content="show dialog" click="btnshowdialog_click" /> <callisto:customdialog x:fieldmodifier="public" x:name="suggesteventdialog" title="suggest event" background="teal" backbuttonvisibility="visible" backbuttonclicked="suggesteventdialog_backbuttonclicked_1"> <stackpanel> <textblock margin="0,0,0,8" text="suggest event should added heron." fontsize="14.6667" fontweight="semilight" textwrapping="wrap" /> <textblock margin="0,0,0,8" fontsize="14.6667" fontweight="semilight" text="event url" /> <callisto:watermarktextbox horizontalalignment="left" watermark="http://www.example.com" width="400" height="35" /> <stackpanel margin="0,20,0,0" horizontalalignment="right" orientation="horizontal"> <button content="ok" width="90" margin="0,0,20,0" /> <button content="cancel" width="90" /> </stackpanel> </stackpanel> </callisto:customdialog> </grid>
c#
private void btnshowdialog_click(object sender, routedeventargs e) { suggesteventdialog.isopen = true; } private void suggesteventdialog_backbuttonclicked_1(object sender, routedeventargs e) { suggesteventdialog.isopen = false; }
Comments
Post a Comment