c# - WPF expand content to outside the window -


i want following effect in wpf

the main window looks following main window when click on friends panel friends list should expanded outside window friends expanded

and when click on item list have able catch event , handle on main window how achieve in wpf?

i've tried use expander, isn't showing content doesn't fit size of window. it's showing part of content

you can use popup control , set placementtarget , placement depending on button clicked. simple example:

<grid>     <grid.rowdefinitions>         <rowdefinition></rowdefinition>         <rowdefinition></rowdefinition>         <rowdefinition></rowdefinition>      </grid.rowdefinitions>     <popup staysopen="false" width="300" height="200" x:name="mypopup">         <popup.child>             <stackpanel background="bisque"></stackpanel>         </popup.child>     </popup>      <button margin="25,25,0,25" horizontalalignment="right" width="100" click="buttonbase_onclick">first</button>     <button grid.row="1" margin="25,25,0,25" horizontalalignment="right" width="100" click="buttonbase_onclick">second</button>     <button grid.row="2" margin="25,25,0,25" horizontalalignment="right" width="100" click="buttonbase_onclick">third</button>  </grid>        private void buttonbase_onclick(object sender, routedeventargs e)     {         mypopup.isopen = false;         mypopup.placementtarget = sender uielement;         mypopup.placement = placementmode.right;         mypopup.allowstransparency = true;         mypopup.popupanimation = popupanimation.fade;         mypopup.isopen = true;     } 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -