In the previous article we will replace the Messagedialog control for MessageBox in Silverlight, and this article will talk about another pop-up window popup control.
First, we know the Islightdismissenabled property of the popup control, when this property is set to True, clicking any area outside the popup control closes the popup.
<button content= "pop-up window One" name= "BTN1" width= "108" margin= "161,96,0,0" verticalalignment= "Top" height= " "click=" Btn1_click "/> <popup x:name=" tip1 "islightdismissenabled=" True "Horizontaloff "161" verticaloffset= "set=" > <grid width= "312" height= "> <grid.backg" Round> <imagebrush imagesource= "./bg.png" ></ImageBrush> </grid .
background> <textblock grid.row= "0" foreground= "White" grid.column= "0" Fontsize= "height=" "Auto" horizontalalignment= "Center" margin= "0 0 0" verticalalignment= "
Top "> <Run> all Fang Shake alone Xuan Yan, the style to the small park </Run> <LineBreak/> <LineBreak/> <Run> shuying Horizontal oblique water clear light, dark fragrance floating Month dusk </Run> <
Linebreak/> <LineBreak/> <Run> frost birds furtive eye first, rapae such as knowledge rains </Run> ;
Linebreak/> <LineBreak/> <Run> Fortunately, there are micro-yin can be Danban, do not have to be a total of gold bottles </Run> </TextBlock> </Grid> </Popup>
Second, we see the popup display and hidden animation settings, specific types have the following, specific effects can download the instance and modify the instance to watch.
<button content= "pop-up window Two" x:name= "Btn1_copy" width= "108" margin= "510,96,0,0" verticalalignment= "Top" Hei ght= "click=" "Btn1_copy_click"/> <popup x:name= "tip2" islightdismissenabled= "True" hor "510" verticaloffset= "izontaloffset=" > <Popup.ChildTransitions> <transiti
Oncollection> <AddDeleteThemeTransition></AddDeleteThemeTransition>
<ContentThemeTransition/> <EdgeUIThemeTransition></EdgeUIThemeTransition> <EntranceThemeTransition></EntranceThemeTransition> <panethem Etransition></panethemetransition> <POPUPTHEMETRANSITION></POPUPTHEMETRANSITION&G
T <ReorderThemeTransition></ReorderThemeTransition> <REPOSITIONTHEMETRANSITION></repositionthemetransition> </TransitionCollection> </popup.childtransitio
ns> <grid width= "312" height= "> <Grid.Background>
<imagebrush imagesource= "./bg.png" ></ImageBrush> </Grid.Background> <textblock grid.row= "0" foreground= "yellow" grid.column= "0" fontsize= "height=" Aut
O "horizontalalignment=" Center "margin=" 0 0 0 "verticalalignment=" top "> <Run> mo-Laughing peasant-wine staying, the harvest of Foot chicken dolphin </Run> <LineBreak/> <linebrea
K/> <Run> Shan, Vista </Run> <LineBreak/> <LineBreak/> <Run> Xiao Drum follow the spring club near, dress simple ancient customs save </Run> <li
Nebreak/> <LineBreak/> <Run> If you are free to take a month, you'll knock on the door at night </Run> </TEXTB lock> </Grid> </Popup> <button content= pop-up window three "X:name=" btn1 _copy1 "width=" 108 "margin=" 850,96,0,0 "verticalalignment=" "Top" "height=" click= "Btn1_copy1_click"/&
Gt <popup x:name= "TIP3" islightdismissenabled= "True" verticaloffset= " -312" horizontaloffset= "Horizonta"
Lalignment= "Right" > <Popup.ChildTransitions> <TransitionCollection> <panethemetransition/> </TransitionCollection> </popup .
childtransitions> <grid width= "312" height= "> <Grid.Background> <imagebrush imagesource= "./bg.png" ></ImageBrush> </grid.background>
; <textblock grid.row= "0" foreground= "Coral" grid.column= "0" fontsize= "" "Height
= "Auto" horizontalalignment= "Center" margin= "0 0 0" verticalalignment= "top" > <Run> Chenens The north of the spring, but the Group Gull Day </Run> <LineBreak/> <lin
ebreak/> <Run> flower path never edge passenger sweep, Peng door This beginning for June Kai </Run> <LineBreak/> <LineBreak/> <Run> Pan chiselled city is far from taste, bottle restaurant poor only old grains </Run> & Lt
Linebreak/> <LineBreak/> <Run> willing to drink with the neighboring Weng, the fence call to take out the rest of the Cup </Run> </TextBlock> </Grid> </Popup>