Design Issue: Popup in each custom usercontrol? or one popup in main ?


hi all,

 my design issue i'm having follows: have main silverlight(page.xaml) contains toolbox user clicks on items , adds custom usercontrol element (equipment_controls.xaml) to page dynamically. implement popup menu these usercontrols(equipment_controls.xaml). should adding popup each of usercontrols?(equipment_controls.xaml) or should have 1 popup usercontrols? (page.xaml) , if there's 1 popup in main page how tell who's calling it?  hope clear.

here popup system implemented, hope helps,

message.xaml 

<usercontrol x:class="silverlightapplication1.message"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    width="400" height="300">
    <grid x:name="layoutroot" background="lightgray" opacity=".3">
        <grid.rowdefinitions>
            <rowdefinition height="40"/>
            <rowdefinition />
            <rowdefinition height="40"/>
            <rowdefinition />
        </grid.rowdefinitions>
        <grid.columndefinitions>
            <columndefinition />
            <columndefinition />
            <columndefinition />
            <columndefinition />
        </grid.columndefinitions>
        <rectangle stroke="black" grid.columnspan="4" grid.rowspan="4"/>
        <textblock x:name="title" grid.columnspan="3" text="title" margin="5" fontweight="bold"/>
        <contentcontrol x:name="contentcontrol1" grid.columnspan="2" grid.rowspan="2"/>
    </grid>
</usercontrol>

page.xaml

 <grid x:name="layoutroot" background="white">
        <local:message x:name="mymessage" />
    </grid>

        void page_loaded(object sender, routedeventargs e)
        {
            mymessage.visibility = visibility.visible;
            mymessage.contentcontrol1.content = "hi there error";
        }

now have popup in page.xaml. use popup to show different output manipulating code behind.

and if post helpful then please 'mark answer' - many thanks

sharker khaleed mahmud
software developer
(mcp,mcts,mcpd[web])

this credits member, earns point , marks thread resolved know have been helped.

 

 

 



Silverlight  >  Designing with Silverlight



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........