PopUp Example

popupex.jpg

The PopUp control allows a convenient way for you to add Help text to your app.

In this example below, just press the question mark FlatGeometryButton and hold in order to display the popup content. Then release the left mouse button to allow the content to disappear.

Popup pop1 = new Popup();

Label myHelp = new Label(){ Content = "You could place\nhelp text here . . .", 
Background = Brushes.Khaki};
myHelp.Width = 134D;
myHelp.Height = 3000D;

//Geometry example sourced from Syncfusion Metro Studio 2 - copyright free icons
Grid imageButton4 = FlatButtonHelpers.CreateFlatGeometryButton(@"F1M1355.27,1727.8L1346.08,1727.8C1346.06,1726.48 1346.05,1725.67 1346.05,1725.38 1346.05,1722.41 1346.54,1719.96 1347.52,1718.04 1348.51,1716.12 1350.47,1713.96 1353.43,1711.56 1356.38,1709.16 1358.14,1707.58 1358.72,1706.84 1359.61,1705.66 1360.05,1704.37 1360.05,1702.95 1360.05,1700.98 1359.27,1699.29 1357.7,1697.89 1356.12,1696.49 1354,1695.78 1351.34,1695.78 1348.77,1695.78 1346.62,1696.52 1344.89,1697.98 1343.16,1699.44 1341.98,1701.68 1341.33,1704.68L1332.04,1703.53C1332.3,1699.23 1334.13,1695.58 1337.53,1692.58 1340.93,1689.58 1345.38,1688.08 1350.91,1688.08 1356.72,1688.08 1361.34,1689.6 1364.77,1692.63 1368.21,1695.67 1369.92,1699.2 1369.92,1703.24 1369.92,1705.47 1369.29,1707.58 1368.03,1709.58 1366.77,1711.57 1364.08,1714.28 1359.95,1717.71 1357.81,1719.49 1356.48,1720.92 1355.97,1722 1355.45,1723.08 1355.22,1725.01 1355.27,1727.8z M1346.08,1741.41L1346.08,1731.29 1356.2,1731.29 1356.2,1741.41 1346.08,1741.41z",
FlatButtonHelpers.GeometryButtonSize.Large, BrushExt.CreateSolidColorBrushFromString("#FF002050"), BrushExt.CreateSolidColorBrushFromString("#FFFFFFFF"), Brushes.Silver, Brushes.WhiteSmoke, Brushes.Silver, new Thickness(0), new Thickness(0), "Help (click and hold to display)",
(sender, e) =>
{
//no need to do anything on mouse over . . .
},
(o, ev) =>
{
    pop1.IsOpen = !pop1.IsOpen;
});

pop1.Initialize(134D, 300D, ContainerType.VerticalPanel, false, imageButton4, 
PopupAnimation.Scroll, false);
          
pop1.BeginComposite<Popup>()
.AddExisting<Label, Popup>(0, 0, myHelp)
.EndComposite<Popup, PopupArgs>(null);

Last edited Mar 28, 2014 at 8:58 PM by stagathome0069, version 6

Comments

No comments yet.