C# Класс Microsoft.Phone.Controls.CustomMessageBox

Наследование: System.Windows.Controls.ContentControl
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CaptionProperty System.Windows.DependencyProperty
IsFullScreenProperty System.Windows.DependencyProperty
IsLeftButtonEnabledProperty System.Windows.DependencyProperty
IsRightButtonEnabledProperty System.Windows.DependencyProperty
LeftButtonContentProperty System.Windows.DependencyProperty
MessageProperty System.Windows.DependencyProperty
RightButtonContentProperty System.Windows.DependencyProperty
TitleProperty System.Windows.DependencyProperty

Открытые методы

Метод Описание
CustomMessageBox ( ) : System

Initializes a new instance of the CustomMessageBox class.

Dismiss ( ) : void

Dismisses the message box.

OnApplyTemplate ( ) : void

Gets the template parts and attaches event handlers. Animates the message box when the template is applied to it.

Show ( ) : void

Reveals the message box by inserting it into a popup and opening it.

Приватные методы

Метод Описание
ClosePopup ( bool restoreOriginalValues ) : void

Closes the pop up.

CustomMessageBox_LayoutUpdated ( object sender, EventArgs e ) : void

Called when the visual layout changes.

Dismiss ( CustomMessageBoxResult source, bool useTransition ) : void

Dismisses the message box.

GetPageOrientation ( ) : PageOrientation

Gets the current page orientation.

GetTransform ( ) : Transform

Gets a transform for popup elements based on the current page orientation.

GetTransformedRect ( ) : Rect

Gets a rectangle that occupies the entire page.

GetVisibilityFromObject ( Object obj ) : Visibility

Returns a visibility value based on the value of an object.

GetVisibilityFromString ( string str ) : Visibility

Returns a visibility value based on the value of a string.

IsLandscape ( PageOrientation orientation ) : bool

Determines whether the orientation is landscape.

LeftButton_Click ( object sender, RoutedEventArgs e ) : void

Dismisses the message box with the left button.

OnBackKeyPress ( object sender, System e ) : void

Called when the back key is pressed. This event handler cancels the backward navigation and dismisses the message box.

OnCaptionPropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Changes the visibility of the caption text block based on its content.

OnIsFullScreenPropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Modifies the vertical alignment of the message box depending on whether it should occupy the full screen or not.

OnLeftButtonContentPropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Changes the visibility of the left button based on its content.

OnMessagePropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Changes the visibility of the message text block based on its content.

OnNavigating ( object sender, System e ) : void

Called when the application frame is navigating. This event handler dismisses the message box.

OnOrientationChanged ( object sender, OrientationChangedEventArgs e ) : void

Called when the current page changes orientation.

OnRightButtonContentPropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Changes the visibility of the right button based on its content.

OnTitlePropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Changes the visibility of the title text block based on its content.

RightButton_Click ( object sender, RoutedEventArgs e ) : void

Dismisses the message box with the right button.

SetSizeAndOffset ( ) : void

Sets The vertical and horizontal offset of the popup, as well as the size of its child container.

Описание методов

CustomMessageBox() публичный Метод

Initializes a new instance of the CustomMessageBox class.
public CustomMessageBox ( ) : System
Результат System

Dismiss() публичный Метод

Dismisses the message box.
public Dismiss ( ) : void
Результат void

OnApplyTemplate() публичный Метод

Gets the template parts and attaches event handlers. Animates the message box when the template is applied to it.
public OnApplyTemplate ( ) : void
Результат void

Show() публичный Метод

Reveals the message box by inserting it into a popup and opening it.
public Show ( ) : void
Результат void

Описание свойств

CaptionProperty публичное статическое свойство

Identifies the Caption dependency property.
public static DependencyProperty,System.Windows CaptionProperty
Результат System.Windows.DependencyProperty

IsFullScreenProperty публичное статическое свойство

Identifies the IsFullScreen dependency property.
public static DependencyProperty,System.Windows IsFullScreenProperty
Результат System.Windows.DependencyProperty

IsLeftButtonEnabledProperty публичное статическое свойство

Identifies the IsLeftButtonEnabled dependency property.
public static DependencyProperty,System.Windows IsLeftButtonEnabledProperty
Результат System.Windows.DependencyProperty

IsRightButtonEnabledProperty публичное статическое свойство

Identifies the IsRightButtonEnabled dependency property.
public static DependencyProperty,System.Windows IsRightButtonEnabledProperty
Результат System.Windows.DependencyProperty

LeftButtonContentProperty публичное статическое свойство

Identifies the LeftButtonContent dependency property.
public static DependencyProperty,System.Windows LeftButtonContentProperty
Результат System.Windows.DependencyProperty

MessageProperty публичное статическое свойство

Identifies the Message dependency property.
public static DependencyProperty,System.Windows MessageProperty
Результат System.Windows.DependencyProperty

RightButtonContentProperty публичное статическое свойство

Identifies the RightButtonContent dependency property.
public static DependencyProperty,System.Windows RightButtonContentProperty
Результат System.Windows.DependencyProperty

TitleProperty публичное статическое свойство

Identifies the Title dependency property.
public static DependencyProperty,System.Windows TitleProperty
Результат System.Windows.DependencyProperty