VideoOS.Platform.Client.ViewItemWpfUserControl Class Reference

The ViewItemWpfUserControl is the WPF version of the ViewItemUserControl. It is instantiated for every position it is created on the current visible view. When a user select another View or ViewLayout, this class will be disposed. No permanent settings can be saved in this class. The Init() method is called when the class is initiated and handle has been created for the UserControl. Please perform resource initialization in this method.
If Message communication is performed, register the MessageReceivers during the Init() method and UnRegister the receivers during the Close() method.
The Close() method can be used to Dispose resources in a controlled manor.
Mouse events not used by this control, should be passed on to the Smart Client by issuing the following methods:
FireClickEvent() for single click
FireDoubleClickEvent() for double click
The single click will be interpreted by the Smart Client as a selection of the item, and the double click will be interpreted to expand the current viewitem to fill the entire View. More...

Inheritance diagram for VideoOS.Platform.Client.ViewItemWpfUserControl:

Public Member Functions

virtual void Close ()
 Method that is called when the view item is closed. The view item should free all resources when the method is called.
 
virtual void Init ()
 Method that is called immediately after the view item is displayed.
 
virtual void Print ()
 Overloaded method of Print, where the information parameter is blank.
 
virtual void Print (string name, string information)
 Same as overloaded Print method, with cameraName empty.
 
virtual void Print (string name, string information, string cameraName)
 Method that is called when print is activated while the content holder is selected.
 
 ViewItemWpfUserControl ()
 

Protected Member Functions

virtual void FireClickEvent ()
 Activates the ClickEvent.
 
virtual void FireDeselectRequestEvent ()
 Activates the DeselectRequestEvent.
 
virtual void FireDoubleClickEvent ()
 Activates the DoubleClickEvent.
 
virtual void FireMaximizeRequestEvent ()
 Activates the MaximizeRequestEvent.
 
virtual void FireRestoreRequestEvent ()
 Activates the RestoreRequestEvent.
 
virtual void FireSelectRequestEvent ()
 Activates the SelectRequestEvent.
 

Properties

virtual double CalculateHeaderFontSize [get]
 Calculate what font size is used in the header for a Camera View Item. This can used to make a similar header in own ViewItem.
 
virtual int CalculateHeaderHeight [get]
 Calculate the height of a Camera View Item. This can used to make a similar header in own ViewItem.
 
virtual bool Hidden [get, set]
 Gets or sets the hidden status on the content holder (e.g. the view item is set to be hidden when another view item is maximized). This status should never be set by the content holder.
 
virtual bool Maximizable [get]
 Gets boolean indicating whether the content holder can be maximized or not. The Maximized property of a non-maximizable content holder will never be set to true. The content holder should implement the click and double click events even if it is not maximizable.
 
virtual bool Maximized [get, set]
 Gets or sets the maximized status on the content holder. This status should never be set directly by the content holder, but instead the content holder should request to be maximized and restored by using the MaximizeRequestEvent and RestoreRequestEvent events.
 
virtual bool Selectable [get]
 Gets boolean indicating whether the content holder can be selectable or not. The Selected property of a non-selectable content holder will never be set to true. The content holder should implement the click and double click events even if it is not selectable.
 
virtual bool Selected [get, set]
 Gets or sets the selected status on the content holder. This status should never be set directly by the content holder, but instead the content holder should request to be selected by using the SelectRequestEvent event.
 
virtual bool ShowToolbar [get]
 Tells the Smart Client if the toolbar should pop up over the ViewItem, when the mouse hover over this ViewItem.
For MIP Plugins the default toolbar contains a print button.
 
WindowInformation WindowInformation [get, set]
 Gives some basic information about the Window holding this UserControl.
 

Events

EventHandler ClickEvent
 Signals that the content holder is clicked.
 
EventHandler DeselectRequestEvent
 Signals that the content holder requests to be deselected.
 
EventHandler DoubleClickEvent
 Signals that the content holder is double clicked clicked.
 
EventHandler MaximizeRequestEvent
 Signals that the content holder requests to be maximized.
 
EventHandler RestoreRequestEvent
 Signals that the content holder requests to be restored.
 
EventHandler SelectRequestEvent
 Signals that the content holder requests to be selected.
 

Detailed Description

The ViewItemWpfUserControl is the WPF version of the ViewItemUserControl. It is instantiated for every position it is created on the current visible view. When a user select another View or ViewLayout, this class will be disposed. No permanent settings can be saved in this class. The Init() method is called when the class is initiated and handle has been created for the UserControl. Please perform resource initialization in this method.
If Message communication is performed, register the MessageReceivers during the Init() method and UnRegister the receivers during the Close() method.
The Close() method can be used to Dispose resources in a controlled manor.
Mouse events not used by this control, should be passed on to the Smart Client by issuing the following methods:
FireClickEvent() for single click
FireDoubleClickEvent() for double click
The single click will be interpreted by the Smart Client as a selection of the item, and the double click will be interpreted to expand the current viewitem to fill the entire View.

Constructor & Destructor Documentation

◆ ViewItemWpfUserControl()

VideoOS.Platform.Client.ViewItemWpfUserControl.ViewItemWpfUserControl ( )
inline

Member Function Documentation

◆ Close()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.Close ( )
inlinevirtual

Method that is called when the view item is closed. The view item should free all resources when the method is called.

◆ FireClickEvent()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.FireClickEvent ( )
inlineprotectedvirtual

Activates the ClickEvent.

◆ FireDeselectRequestEvent()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.FireDeselectRequestEvent ( )
inlineprotectedvirtual

Activates the DeselectRequestEvent.

◆ FireDoubleClickEvent()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.FireDoubleClickEvent ( )
inlineprotectedvirtual

Activates the DoubleClickEvent.

◆ FireMaximizeRequestEvent()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.FireMaximizeRequestEvent ( )
inlineprotectedvirtual

Activates the MaximizeRequestEvent.

◆ FireRestoreRequestEvent()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.FireRestoreRequestEvent ( )
inlineprotectedvirtual

Activates the RestoreRequestEvent.

◆ FireSelectRequestEvent()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.FireSelectRequestEvent ( )
inlineprotectedvirtual

Activates the SelectRequestEvent.

◆ Init()

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.Init ( )
inlinevirtual

Method that is called immediately after the view item is displayed.

◆ Print() [1/3]

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.Print ( )
inlinevirtual

Overloaded method of Print, where the information parameter is blank.

◆ Print() [2/3]

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.Print ( string name,
string information )
inlinevirtual

Same as overloaded Print method, with cameraName empty.

Parameters
nameThe name of this viewItem
informationInformation being shown in a multi-line box

◆ Print() [3/3]

virtual void VideoOS.Platform.Client.ViewItemWpfUserControl.Print ( string name,
string information,
string cameraName )
inlinevirtual

Method that is called when print is activated while the content holder is selected.

Base implementation does it as shown below:

Rect bounds = VisualTreeHelper.GetDescendantBounds(this);
RenderTargetBitmap renderTarget = new RenderTargetBitmap((Int32)bounds.Width, (Int32)bounds.Height, 96, 96, PixelFormats.Pbgra32);
DrawingVisual visual = new DrawingVisual();
using (DrawingContext context = visual.RenderOpen())
{
VisualBrush visualBrush = new VisualBrush(this);
context.DrawRectangle(visualBrush, null, new Rect(new Point(), bounds.Size));
}
renderTarget.Render(visual);
ClientControl.Instance.Print(BitmapFrame.Create(renderTarget), name, information, cameraName);
The class to access Client relevant methods.
Definition ClientControl.cs:37
static ClientControl Instance
This Singleton item of this class. Only use the 'get' access method.
Definition ClientControl.cs:105
virtual void Print(Bitmap bitmap, String name, String extraInformation)
This method is deprecated. Windows Forms controls are no longer supported. Use Print(ImageSource,...
Definition ClientControl.cs:600
Parameters
nameThe name of this viewItem
informationInformation being shown in a multi-line box
cameraNameBlank or name of a camera

Property Documentation

◆ CalculateHeaderFontSize

virtual double VideoOS.Platform.Client.ViewItemWpfUserControl.CalculateHeaderFontSize
get

Calculate what font size is used in the header for a Camera View Item. This can used to make a similar header in own ViewItem.

◆ CalculateHeaderHeight

virtual int VideoOS.Platform.Client.ViewItemWpfUserControl.CalculateHeaderHeight
get

Calculate the height of a Camera View Item. This can used to make a similar header in own ViewItem.

◆ Hidden

virtual bool VideoOS.Platform.Client.ViewItemWpfUserControl.Hidden
getset

Gets or sets the hidden status on the content holder (e.g. the view item is set to be hidden when another view item is maximized). This status should never be set by the content holder.

◆ Maximizable

virtual bool VideoOS.Platform.Client.ViewItemWpfUserControl.Maximizable
get

Gets boolean indicating whether the content holder can be maximized or not. The Maximized property of a non-maximizable content holder will never be set to true. The content holder should implement the click and double click events even if it is not maximizable.

◆ Maximized

virtual bool VideoOS.Platform.Client.ViewItemWpfUserControl.Maximized
getset

Gets or sets the maximized status on the content holder. This status should never be set directly by the content holder, but instead the content holder should request to be maximized and restored by using the MaximizeRequestEvent and RestoreRequestEvent events.

◆ Selectable

virtual bool VideoOS.Platform.Client.ViewItemWpfUserControl.Selectable
get

Gets boolean indicating whether the content holder can be selectable or not. The Selected property of a non-selectable content holder will never be set to true. The content holder should implement the click and double click events even if it is not selectable.

◆ Selected

virtual bool VideoOS.Platform.Client.ViewItemWpfUserControl.Selected
getset

Gets or sets the selected status on the content holder. This status should never be set directly by the content holder, but instead the content holder should request to be selected by using the SelectRequestEvent event.

◆ ShowToolbar

virtual bool VideoOS.Platform.Client.ViewItemWpfUserControl.ShowToolbar
get

Tells the Smart Client if the toolbar should pop up over the ViewItem, when the mouse hover over this ViewItem.
For MIP Plugins the default toolbar contains a print button.

◆ WindowInformation

WindowInformation VideoOS.Platform.Client.ViewItemWpfUserControl.WindowInformation
getset

Gives some basic information about the Window holding this UserControl.

Event Documentation

◆ ClickEvent

EventHandler VideoOS.Platform.Client.ViewItemWpfUserControl.ClickEvent

Signals that the content holder is clicked.

◆ DeselectRequestEvent

EventHandler VideoOS.Platform.Client.ViewItemWpfUserControl.DeselectRequestEvent

Signals that the content holder requests to be deselected.

◆ DoubleClickEvent

EventHandler VideoOS.Platform.Client.ViewItemWpfUserControl.DoubleClickEvent

Signals that the content holder is double clicked clicked.

◆ MaximizeRequestEvent

EventHandler VideoOS.Platform.Client.ViewItemWpfUserControl.MaximizeRequestEvent

Signals that the content holder requests to be maximized.

◆ RestoreRequestEvent

EventHandler VideoOS.Platform.Client.ViewItemWpfUserControl.RestoreRequestEvent

Signals that the content holder requests to be restored.

◆ SelectRequestEvent

EventHandler VideoOS.Platform.Client.ViewItemWpfUserControl.SelectRequestEvent

Signals that the content holder requests to be selected.