﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Crosslight - Open DrawerSide.Left</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Open-DrawerSideLeft/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Open DrawerSide.Left</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Open-DrawerSideLeft/</link><pubDate>Mon, 13 Oct 2014 06:35:14 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I created a project using &lt;a href="http://developer.intersoftpt.com/display/crosslight/Navigation+Drawer+Template" target="_blank"&gt;Navigation Drawer template&lt;/a&gt;. It has ShowToast() method in SimpleViewModel so that when user press Button1, it will show a ToastPresenter which returns NewText property.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I modified the ShowToast() method to open the drawer by using following snippet code:&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;private void ShowToast(object parameter)
{
    IDrawerViewModel drawerViewModel = IocContainer.Current.Resolve&amp;lt;IDrawerViewModel&amp;gt;();
    if (drawerViewModel != null)
        drawerViewModel.Open(DrawerSide.Left);
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please note that I'm using &lt;a href="http://developer.intersoftpt.com/display/crosslightapi/IocContainer+Class" target="_blank"&gt;IoCContainer class&lt;/a&gt; to get the instance of DrawerViewModel. The registrar is specified in the contructor of DrawerViewModel.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;public DrawerViewModel()
{
    this.LeftViewModel = new NavigationViewModel();
    this.CenterViewModel = new SimpleViewModel();

    //this.Open(DrawerSide.Left);

    IocContainer.Current.RegisterInstance&amp;lt;IDrawerViewModel&amp;gt;(this);
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;After saving the changes, pressing Button1 will open the drawer.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Open DrawerSide.Left</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Open-DrawerSideLeft/</link><pubDate>Fri, 10 Oct 2014 01:15:38 GMT</pubDate><dc:creator>devincroud</dc:creator><description>&lt;p&gt;I tried to make a static method to Open the Drawer from another button in another ViewController but am unable to do so.&amp;nbsp;&lt;/p&gt;&lt;p&gt;



&lt;font face="Menlo"&gt;
&lt;span style="color:#333333;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#009695;"&gt;public&lt;/span&gt;&lt;span style="color:#333333;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#009695;"&gt;static&lt;/span&gt;&lt;span style="color:#333333;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#009695;"&gt;void&lt;/span&gt;&lt;span style="color:#333333;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#333333;"&gt;OpenIt&lt;/span&gt;&lt;span style="color:#333333;"&gt;()&lt;/span&gt;&lt;br&gt;
&lt;span style="color:#333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#333333;"&gt;{&lt;/span&gt;&lt;br&gt;
&lt;span style="color:#333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#333333;"&gt;Open&lt;/span&gt;&lt;span style="color:#333333;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#333333;"&gt;(&lt;/span&gt;&lt;span style="color:#3364a4;"&gt;DrawerSide&lt;/span&gt;&lt;span style="color:#333333;"&gt;.&lt;/span&gt;&lt;span style="color:#333333;"&gt;Left&lt;/span&gt;&lt;span style="color:#333333;"&gt;)&lt;/span&gt;&lt;span style="color:#333333;"&gt;;&lt;/span&gt;&lt;br&gt;
&lt;span style="color:#333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#333333;"&gt;}&lt;/span&gt;&lt;/font&gt;

&lt;/p&gt;&lt;p&gt;but Open is a Non-Static member and hard-coded so I cannot change it. &amp;nbsp;How can I slide open the Drawer from another ViewModel not in the DrawerViewModel?&lt;/p&gt;</description></item></channel></rss>