### Implement Starting Method Source: https://doc.opensilver.net/reference/System.Windows.IApplicationLifetimeAware.html Represents the event that occurs just before the application starts. Use this for pre-startup configuration or setup. ```csharp void Starting() ``` -------------------------------- ### Example Web.config ConnectionStrings Section Source: https://doc.opensilver.net/documentation/general/business-app.html A complete example of how the section should look in the Web.config file. ```xml ``` -------------------------------- ### Usage Examples Source: https://doc.opensilver.net/reference/System.ServiceModel.CSHTML5_ClientBase-1.html Examples demonstrating how to use the CSHTML5_ClientBase class to interact with WCF services. ```APIDOC ### Examples Here is an example on how you can use a WebService to receive data: ```csharp //We create a new instance of the ServiceClient MyServiceClient soapClient = new MyServiceClient( new BasicHttpBinding(), new EndpointAddress( new Uri("http://MyServiceAddress.com/MyService.svc"))); //We call the method that will give us the data we want: var result = await soapClient.GetToDosAsync(_ownerId); //We get the data from the response: ToDoItem[] todos = result.Body.GetToDosResult; ``` Here is another example that shows how you can send data to a WebService: ```csharp //We create an item to send to the WebService: ToDoItem todo = new ToDoItem() { Description = MyTextBox.Text, Id = Guid.NewGuid(), }; //We create a new instance of the ServiceClient MyServiceClient soapClient = new MyServiceClient( new BasicHttpBinding(), new EndpointAddress( new Uri("http://MyServiceAddress.com/MyService.svc"))); //We send the data by calling a method implemented for that purpose in the WebService: await soapClient.AddOrUpdateToDoAsync(todo); ``` ``` -------------------------------- ### Implement Started Method Source: https://doc.opensilver.net/reference/System.Windows.IApplicationLifetimeAware.html Represents the event that occurs after the application has started. This is typically called after initialization is complete. ```csharp void Started() ``` -------------------------------- ### From Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.ByteAnimation.html Gets or sets the animation's starting value. ```APIDOC ## From ### Description Gets or sets the animation's starting value. ### Declaration ```csharp public byte? From { get; set; } ``` ### Property Value - **Type**: System.Nullable - **Description**: The starting value of the animation. The default value is null. ``` -------------------------------- ### Install .NET WebAssembly Tools Source: https://doc.opensilver.net/documentation/general/development-setup.html Use this command in your terminal to install the WebAssembly tools for the .NET SDK. This is a required step for OpenSilver development. ```bash dotnet workload install wasm-tools ``` -------------------------------- ### Install .NET WebAssembly Build Tools Source: https://doc.opensilver.net/documentation/how-to-topics/aot-compilation.html Execute this command in an elevated command prompt to install the necessary tools for WebAssembly AOT compilation. ```bash dotnet workload install wasm-tools ``` -------------------------------- ### Install Method Source: https://doc.opensilver.net/reference/System.Windows.Application.html Attempts to install the application for out-of-browser execution. Returns true if consent is given or elevated trust is required, otherwise false. Throws InvalidOperationException if the application is already installed or hosted on an unsupported URI scheme. ```csharp [NotImplemented] public bool Install() ``` -------------------------------- ### Verify .NET Installation Source: https://doc.opensilver.net/documentation/how-to-topics/aot-compilation.html Run this command to check if .NET 7.0 or a higher version is installed on your system. ```bash dotnet --info ``` -------------------------------- ### Install Source: https://doc.opensilver.net/reference/System.Windows.Application.html Attempts to install the application for offline execution. ```APIDOC ## POST /api/install ### Description Attempts to install the application so that it can run outside the browser. ### Method POST ### Endpoint /api/install ### Returns #### Success Response (200) - **boolean** - true if the user gave consent to install the application or the application requires elevated trust; otherwise, false. #### Error Response (400) - **System.InvalidOperationException** - The application is already installed or hosted at an invalid URI scheme. ### Response Example { "example": true } ``` -------------------------------- ### Install OpenSilver .NET CLI Templates Source: https://doc.opensilver.net/documentation/how-to-topics/visual-studio-code-support.html Run this command in your CLI to install the OpenSilver Templates package. This enables the creation of new OpenSilver projects using the .NET CLI. ```bash dotnet new install OpenSilver.Templates ``` -------------------------------- ### Create an OpenSilver Application with Photino Source: https://doc.opensilver.net/documentation/general/photino-launcher.html Use the .NET CLI to scaffold a new project with the Photino launcher included. ```bash dotnet new opensilverapp -o MyAppName --usePhotino ``` -------------------------------- ### Access From Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.Int64Animation.html Gets or sets the animation's starting value. ```csharp public long? From { get; set; } ``` -------------------------------- ### Initialize Application Source: https://doc.opensilver.net/reference/System.Windows.Application.html Constructors for the Application class. ```csharp public Application() ``` ```csharp public Application(string rootDivId) ``` -------------------------------- ### Access From Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.Int32Animation.html Gets or sets the animation's starting value. ```csharp public int? From { get; set; } ``` -------------------------------- ### Run an OpenSilver Photino Application Source: https://doc.opensilver.net/documentation/general/photino-launcher.html Navigate to the generated Photino project directory and execute the application. ```bash cd MyAppName.Photino dotnet run ``` -------------------------------- ### From Property Definition Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.Int16Animation.html Gets or sets the animation's starting value. ```csharp public short? From { get; set; } ``` -------------------------------- ### Build and Deploy OpenSilver Project Source: https://doc.opensilver.net/documentation/how-to-topics/command-line-publish.html Execute this command in the solution folder to rebuild the project and deploy it. Ensure Visual Studio Build Tools and .NET SDK are installed. ```bash msbuild OpenSilverApplication.sln /t:Rebuild /p:DeployOnBuild=true ``` -------------------------------- ### By Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.ByteAnimation.html Gets or sets the total amount by which the animation changes its starting value. ```APIDOC ## By ### Description Gets or sets the total amount by which the animation changes its starting value. ### Declaration ```csharp [NotImplemented] public byte? By { get; set; } ``` ### Property Value - **Type**: System.Nullable - **Description**: The total amount by which the animation changes its starting value. The default value is null. ``` -------------------------------- ### OnLaunched Method Source: https://doc.opensilver.net/reference/System.Windows.Application.html Invoked when the application is launched. Override this method to perform application initialization and display initial content. ```csharp protected virtual void OnLaunched(LaunchActivatedEventArgs args) ``` -------------------------------- ### SelectionStart Property Declaration Source: https://doc.opensilver.net/reference/System.Windows.Controls.TextBox.html Gets or sets the starting position of the selected text. ```csharp public int SelectionStart { get; set; } ``` -------------------------------- ### TimeHintContent Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.TimeUpDown.html Gets the text used to guide the user when entering time. ```csharp public object TimeHintContent { get; } ``` -------------------------------- ### Property: ShowInstallMenuItem Source: https://doc.opensilver.net/reference/System.Windows.OutOfBrowserSettings.html Retrieves a boolean value indicating if the application right-click menu includes an install option. ```APIDOC ## Property ShowInstallMenuItem ### Description Gets a value that indicates whether the application right-click menu includes an install option. ### Declaration `public bool ShowInstallMenuItem { get; }` ### Property Value - **Type**: System.Boolean - **Description**: true if the right-click menu includes an install option; otherwise, false. The default is true. ``` -------------------------------- ### Publish .Browser Project via Command Line Source: https://doc.opensilver.net/documentation/general/deployment.html Use this command to publish the .Browser project for deployment. Navigate to the .Browser folder and execute the command. The output will be in a publish folder. ```bash dotnet publish -c Release ``` -------------------------------- ### Line Properties Source: https://doc.opensilver.net/reference/System.Windows.Shapes.Line.html Details the properties for setting and getting the start and end coordinates of the line. ```APIDOC ## Line Properties ### X1 Gets or sets the x-coordinate of the Line start point. #### Declaration ```csharp public double X1 { get; set; } ``` #### Property Value Type | Description ---|--- System.Double | The x-coordinate for the start point of the line, in pixels. The default is 0. ### X2 Gets or sets the x-coordinate of the Line end point. #### Declaration ```csharp public double X2 { get; set; } ``` #### Property Value Type | Description ---|--- System.Double | The x-coordinate for the end point of the line, in pixels. The default is 0. ### Y1 Gets or sets the y-coordinate of the Line start point. #### Declaration ```csharp public double Y1 { get; set; } ``` #### Property Value Type | Description ---|--- System.Double | The y-coordinate for the start point of the line, in pixels. The default is 0. ### Y2 Gets or sets the y-coordinate of the Line end point. #### Declaration ```csharp public double Y2 { get; set; } ``` #### Property Value Type | Description ---|--- System.Double | The y-coordinate for the end point of the line, in pixels. The default is 0. ``` -------------------------------- ### Access By Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.SingleAnimation.html Gets or sets the total amount by which the animation changes its starting value. ```csharp [NotImplemented] public float? By { get; set; } ``` -------------------------------- ### Access By Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.SizeAnimation.html Gets or sets the total amount by which the animation changes its starting value. ```csharp [NotImplemented] public Size? By { get; set; } ``` -------------------------------- ### From Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.ByteAnimation.html Gets or sets the animation's starting value. The default value is null. ```csharp public byte? From { get; set; } ``` -------------------------------- ### Get Help for opensilverapp Template Source: https://doc.opensilver.net/documentation/how-to-topics/visual-studio-code-support.html View command-line switches and options for the 'opensilverapp' template. This is useful for understanding customization during project creation. ```bash dotnet new opensilverapp --help ``` -------------------------------- ### Publish a Photino Application Source: https://doc.opensilver.net/documentation/general/photino-launcher.html Build the application for deployment using the standard .NET publish command. ```bash dotnet publish ``` -------------------------------- ### DragDecoratorContentMouseOffset Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.ItemDragEventArgs.html Gets or sets the mouse offset from the item being dragged at the start of the operation. ```csharp public Point DragDecoratorContentMouseOffset { get; set; } ``` -------------------------------- ### UIElement TextInputStart Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.ColumnBarBaseSeries-1.html Gets or sets a value that indicates whether text input has started. ```csharp public bool TextInputStart { get; } ``` -------------------------------- ### BeginStoryboard Constructor Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.BeginStoryboard.html Initializes a new instance of the BeginStoryboard class. No specific setup is required before using this constructor. ```csharp public BeginStoryboard() ``` -------------------------------- ### From Property Declaration Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.DecimalAnimation.html Gets or sets the animation's starting value. The default value is null. ```csharp public decimal? From { get; set; } ``` -------------------------------- ### Build OpenSilver Project with Default Configuration Source: https://doc.opensilver.net/documentation/how-to-topics/command-line-build.html Use this command to build your OpenSilver project with the default build configuration. ```bash msbuild TestProject.sln ``` -------------------------------- ### StartService Method Declaration Source: https://doc.opensilver.net/reference/System.Windows.IApplicationService.html Initializes the application extension service using the provided context. ```csharp void StartService(ApplicationServiceContext context) ``` -------------------------------- ### Get Start Date of CalendarDateRange Source: https://doc.opensilver.net/reference/System.Windows.Controls.CalendarDateRange.html Retrieves the first date included in the CalendarDateRange. This property is read-only. ```csharp public DateTime Start { get; } ``` -------------------------------- ### Get or Set Line Points Source: https://doc.opensilver.net/reference/System.Windows.Media.LineGeometry.html Properties to retrieve or modify the start and end points of the line geometry. ```csharp public Point EndPoint { get; set; } ``` ```csharp public Point StartPoint { get; set; } ``` -------------------------------- ### StartService Method Source: https://doc.opensilver.net/reference/System.Windows.IApplicationService.html Called by an application to initialize the application extension service. ```APIDOC ## StartService(ApplicationServiceContext) Called by an application in order to initialize the application extension service. ### Declaration ```csharp void StartService(ApplicationServiceContext context) ``` ### Parameters #### Path Parameters - **context** (ApplicationServiceContext) - Required - Provides information about the application state. ``` -------------------------------- ### Access By Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.Int64Animation.html Gets or sets the total amount by which the animation changes its starting value. Marked as not implemented. ```csharp [NotImplemented] public long? By { get; set; } ``` -------------------------------- ### By Property Definition Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.Int16Animation.html Gets or sets the total amount by which the animation changes its starting value. Marked as [NotImplemented]. ```csharp [NotImplemented] public short? By { get; set; } ``` -------------------------------- ### Configure Radzen.Blazor Services and Assets Source: https://doc.opensilver.net/documentation/general/opensilver-blazor.html Required setup steps in index.html, Program.cs, and XAML to enable Radzen components. ```html ``` ```csharp builder.Services.AddRadzenComponents(); ``` ```xml @using Radzen @using Radzen.Blazor ``` -------------------------------- ### Check for Install Menu Item Property Source: https://doc.opensilver.net/reference/System.Windows.OutOfBrowserSettings.html Indicates whether the application's right-click menu includes an install option. Returns a boolean value. ```csharp public bool ShowInstallMenuItem { get; } ``` -------------------------------- ### OpenSilver Project File Structure Example Source: https://doc.opensilver.net/documentation/general/getting-started-tour.html Illustrates the typical files found in an OpenSilver application project for C#, VB.NET, and F#. ```plaintext * For C# code migration :- App.xaml, App.xaml.cs, MainPage.xaml and MainPage.xaml.cs. * For VB.NET code migration :- App.xaml, App.xaml.vb, MainPage.xaml and MainPage.xaml.vb. * For F# code migration :- App.xaml, App.xaml.fs, MainPage.xaml and MainPage.xaml.fs. ``` -------------------------------- ### By Property Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.ByteAnimation.html Gets or sets the total amount by which the animation changes its starting value. The default value is null. ```csharp [NotImplemented] public byte? By { get; set; } ``` -------------------------------- ### Initialize HttpClient in OpenSilver Source: https://doc.opensilver.net/documentation/in-depth-topics/wcf-and-webclient.html Sets up the base URL and HttpClient instance for communicating with the REST service. ```csharp const string BaseUrl = "https://localhost:7037"; private static readonly HttpClient Client = new HttpClient(); private async Task DownloadAsync() { ``` -------------------------------- ### By Property Declaration Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.DecimalAnimation.html Gets or sets the total amount by which the animation changes its starting value. The default value is null. ```csharp [NotImplemented] public decimal? By { get; set; } ``` -------------------------------- ### ContentStart Property Getter Source: https://doc.opensilver.net/reference/System.Windows.Controls.RichTextBlock.html Gets a TextPointer indicating the start of the content within the RichTextBlock. This property is marked as NotImplemented. ```csharp [NotImplemented] public TextPointer ContentStart { get; } ``` -------------------------------- ### Display MSBuild Help Options Source: https://doc.opensilver.net/documentation/how-to-topics/command-line-build.html View a comprehensive list of available MSBuild command-line options by running the msbuild -help command. ```bash msbuild -help ``` -------------------------------- ### Get SelectionStart Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.RichTextBlock.html Returns a TextPointer indicating the start of the current selection in the RichTextBlock or a linked container chain. This property is read-only. ```csharp [NotImplemented] public TextPointer SelectionStart { get; } ``` -------------------------------- ### Deployment Constructor Source: https://doc.opensilver.net/reference/System.Windows.Deployment.html Initializes a new instance of the Deployment class. ```APIDOC ## Deployment() Initializes a new instance of the Deployment class. ### Declaration ```csharp public Deployment() ``` ### Exceptions Type | Condition ---|--- System.InvalidOperationException | The Current property has already been initialized. ``` -------------------------------- ### Accessing the AppStarting Cursor Source: https://doc.opensilver.net/reference/System.Windows.Input.Cursors.html Use this property to get the cursor that appears when an application is starting. This is useful for providing visual feedback during loading or processing. ```csharp public static Cursor AppStarting { get; } ``` -------------------------------- ### Initialize DescriptionViewer Source: https://doc.opensilver.net/reference/System.Windows.Controls.DescriptionViewer.html Initializes a new instance of the DescriptionViewer class. This is the default constructor. ```csharp public DescriptionViewer() ``` -------------------------------- ### Get WindowStartupLocation Property Source: https://doc.opensilver.net/reference/System.Windows.WindowSettings.html Retrieves the startup positioning of an out-of-browser application window. No specific setup is required beyond having an instance of the relevant window class. ```csharp public WindowStartupLocation WindowStartupLocation { get; } ``` -------------------------------- ### IsLooping Property Declaration Source: https://doc.opensilver.net/reference/System.Windows.Controls.MediaElement.html Gets or sets a value that describes whether the media source currently loaded in the media engine should automatically set the position to the media start after reaching its end. This is a read-write property. ```csharp public bool IsLooping { get; set; } ``` -------------------------------- ### Theme Class Implementation Example Source: https://doc.opensilver.net/documentation/how-to-topics/theme-handling.html Implement a custom theme class by inheriting from OpenSilver.Theming.Theme and overriding the GenerateResources method to load theme-specific styles for supported assemblies. ```csharp protected override ResourceDictionary GenerateResources(Assembly assembly) { string assemblyName = assembly.GetName().Name; if (IsSupportedAssembly(assemblyName)) { return CreateDictionary(assemblyName); } return null; } ``` ```csharp private ResourceDictionary CreateDictionary(string assemblyName) { var resources = new ResourceDictionary(); resources.Source = new Uri($"/SomeTheme;component/Themes/{assemblyName}.xaml", UriKind.Relative); Application.LoadComponent(resources, resources.Source); return resources; } ``` ```csharp private static bool IsSupportedAssembly(string assemblyName) { // Keep only assemblies handled by your theme: return assemblyName is "OpenSilver" or "OpenSilver.Controls" or "OpenSilver.Controls.Toolkit" or "OpenSilver.Controls.Layout.Toolkit" or "OpenSilver.Controls.Data.Input" or "OpenSilver.Controls.Input" or "OpenSilver.Controls.Input.Toolkit" or "OpenSilver.Controls.Data" or "OpenSilver.Controls.DataVisualization.Toolkit" or "OpenSilver.Controls.Data.DataForm.Toolkit"; } ``` -------------------------------- ### Syntax for StartupEventHandler Source: https://doc.opensilver.net/reference/System.Windows.StartupEventHandler.html Defines the delegate signature for handling application startup events. ```csharp public delegate void StartupEventHandler(object sender, StartupEventArgs e); ``` -------------------------------- ### Initialize SizeAnimation with Start and End Values, Duration, and FillBehavior Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.SizeAnimation.html Use this constructor to fully define the animation's start and end values, duration, and fill behavior. This offers the most control over the animation's lifecycle and appearance. ```csharp public SizeAnimation(Size fromValue, Size toValue, Duration duration, FillBehavior fillBehavior) ``` -------------------------------- ### Initialize DeploymentCatalog with URI Source: https://doc.opensilver.net/reference/System.ComponentModel.Composition.Hosting.DeploymentCatalog.html Initializes a new instance of the DeploymentCatalog class using the XAP file at the specified URI. Note: This constructor is marked as NotImplemented. ```csharp [NotImplemented] public DeploymentCatalog(Uri uri) ``` -------------------------------- ### Start and Close Animation Storyboard Source: https://doc.opensilver.net/documentation/in-depth-topics/storyboards-and-animations.html This C# code handles a button click to start a closing animation storyboard, making a close button visible and a start button collapsed. ```C# void ButtonToStartAnimationClose_Click(object sender, RoutedEventArgs e) { var storyboard = (Storyboard)CanvasForAnimationsDemo.Resources["AnimationToClose"]; storyboard.Begin(); ButtonToStartAnimationOpen.Visibility = Visibility.Visible; ButtonToStartAnimationClose.Visibility = Visibility.Collapsed; } ``` -------------------------------- ### OnBeginningEdit Method Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataForm.html Raises the BeginningEdit event. ```csharp protected virtual void OnBeginningEdit(CancelEventArgs e) ``` -------------------------------- ### Get IsSelectionActive Source: https://doc.opensilver.net/reference/System.Windows.Controls.Primitives.Selector.html Gets a value that indicates whether the specified Selector has the focus. ```csharp public static bool GetIsSelectionActive(DependencyObject element) ``` -------------------------------- ### Get ActualIndependentAxis Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.ColumnBarBaseSeries-1.html Gets the independent axis as a category axis. This property is read-only. ```csharp public IAxis ActualIndependentAxis { get; } ``` -------------------------------- ### Create a New OpenSilver Project via CLI Source: https://doc.opensilver.net/documentation/how-to-topics/visual-studio-code-support.html Create a new OpenSilver web project using the 'opensilverapp' template. Replace 'MyProject' with your desired project name. This command uses the short name of the template. ```bash dotnet new opensilverapp -n MyProject ``` -------------------------------- ### Get ActualDependentRangeAxis Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.ColumnBarBaseSeries-1.html Gets the dependent axis as a range axis. This property is read-only. ```csharp public IRangeAxis ActualDependentRangeAxis { get; } ``` -------------------------------- ### Create a new class library targeting .NET Standard 2.0 Source: https://doc.opensilver.net/documentation/how-to-topics/multi-targetting.html Use this command to create a new class library project. You can specify any target framework, like .NET Standard 2.0. ```bash dotnet new classlib -f netstandard2.0 ``` -------------------------------- ### Get DateFormatInfo Source: https://doc.opensilver.net/reference/System.Windows.Controls.GregorianCalendarInfo.html Gets the DateTimeFormatInfo used for formatting dates within the Gregorian calendar. ```csharp public override DateTimeFormatInfo DateFormatInfo { get; } ``` -------------------------------- ### Get FormattedIndependentValue Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.DataPoint.html Gets the IndependentValue as formatted by the IndependentValueStringFormat property. This property is of type String. ```csharp public string FormattedIndependentValue { get; } ``` -------------------------------- ### Show Method Source: https://doc.opensilver.net/reference/System.Windows.Window.html Displays the window. This method is marked as NotImplemented and requires further implementation. ```csharp [NotImplemented] public void Show() ``` -------------------------------- ### Get FormattedDependentValue Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.DataPoint.html Gets the DependentValue as formatted by the DependentValueStringFormat property. This property is of type String. ```csharp public string FormattedDependentValue { get; } ``` -------------------------------- ### Initialize TransitioningContentControl Source: https://doc.opensilver.net/reference/System.Windows.Controls.TransitioningContentControl.html Constructor for creating a new instance of the TransitioningContentControl. ```csharp public TransitioningContentControl() ``` -------------------------------- ### VisualState Class Overview Source: https://doc.opensilver.net/reference/System.Windows.VisualState.html Documentation for the VisualState class, including its constructors and properties. ```APIDOC ## Class VisualState ### Description Represents the visual appearance of the control when it is in a specific state. ### Namespace System.Windows ### Assembly OpenSilver.dll ### Syntax public sealed class VisualState : DependencyObject, IDependencyObject ### Constructors #### VisualState() Initializes a new instance of the VisualState class. ### Properties - **Name** (string) - Gets or sets the name of the VisualState. - **Storyboard** (Storyboard) - Gets or sets a Storyboard that defines the appearance of the control when it is the state that is represented by the VisualState. ``` -------------------------------- ### Get XAP File URI Source: https://doc.opensilver.net/reference/System.ComponentModel.Composition.Hosting.DeploymentCatalog.html Gets the URI for the XAP file associated with the DeploymentCatalog. ```csharp public Uri Uri { get; } ``` -------------------------------- ### Initialize ChannelBase constructor Source: https://doc.opensilver.net/reference/System.ServiceModel.CSHTML5_ClientBase-1.ChannelBase-1.html Constructor for creating a new instance from an existing CSHTML5_ClientBase instance. ```csharp [NotImplemented] protected ChannelBase(CSHTML5_ClientBase client) ``` -------------------------------- ### Get or Set Hyperlink MouseOverTextDecorations Source: https://doc.opensilver.net/reference/System.Windows.Documents.Hyperlink.html Gets or sets the TextDecorationCollection that decorates the Hyperlink when the mouse pointer is over it. ```csharp public TextDecorationCollection MouseOverTextDecorations { get; set; } ``` -------------------------------- ### PieSeries Constructors Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.PieSeries.html Details on how to initialize a new instance of the PieSeries class. ```APIDOC ## PieSeries() ### Description Initializes a new instance of the PieSeries class. ### Declaration ```csharp public PieSeries() ``` ``` -------------------------------- ### Create OpenSilver App for All MAUI Platforms Source: https://doc.opensilver.net/documentation/how-to-topics/maui-hybrid-launcher.html Use this command to generate a new OpenSilver application with support for all MAUI platforms. The Browser launcher is included by default. ```bash dotnet new opensilverapp -o MyAppName --mauiPlatforms all ``` -------------------------------- ### Initialize Blazor for OpenSilver Source: https://doc.opensilver.net/documentation/general/opensilver-blazor.html Register Blazor services in the application startup sequence for Browser or MAUI-Hybrid projects. ```csharp Initializer.UseBlazorForOpenSilver(builder); ``` ```csharp Initializer.UseBlazorForOpenSilver(blazorWebView.RootComponents); ``` -------------------------------- ### ActionCommand Constructors Source: https://doc.opensilver.net/reference/Microsoft.Expression.Interactivity.Core.ActionCommand.html Provides information on how to initialize an ActionCommand instance. ```APIDOC ## ActionCommand(Action) ### Description Initializes a new instance of the ActionCommand class. ### Parameters - **action** (System.Action) - The action to be executed. ### Remarks Use this constructor to provide an action that ignores the ICommand parameter. ``` ```APIDOC ## ActionCommand(Action) ### Description Initializes a new instance of the ActionCommand class. ### Parameters - **objectAction** (System.Action) - An action that takes an object parameter. ### Remarks Use this constructor to provide an action that uses the object parameter passed by the Execute method. ``` -------------------------------- ### CSHTML5_ClientBase Constructor Source: https://doc.opensilver.net/reference/System.ServiceModel.CSHTML5_ClientBase-1.html Initializes a new instance of the CSHTML5_ClientBase class. ```APIDOC ## CSHTML5_ClientBase Constructor ### Description Initializes a new instance of the CSHTML5_ClientBase class with the specified endpoint configuration name and remote address. ### Method protected CSHTML5_ClientBase ### Parameters #### Path Parameters - **endpointConfigurationName** (System.String) - Required - The name of the endpoint in the application configuration file. - **remoteAddress** (System.String) - Required - The address of the service. ### Exceptions - **System.ArgumentNullException**: The endpoint is null. - **System.ArgumentNullException**: The remote address is null. - **System.InvalidOperationException**: The endpoint cannot be found or the endpoint contract is not valid. ``` -------------------------------- ### Install Optional Endpoint NuGet Package Source: https://doc.opensilver.net/documentation/3rd-party-libraries/ria-services.html Install this package if using Soap and Json Ria Endpoints. ```powershell Install-Package OpenRiaServices.Endpoints -Version 4.6.0 ``` -------------------------------- ### Startup Event Source: https://doc.opensilver.net/reference/System.Windows.Application.html Occurs when an application is started. Handled by StartupEventHandler. ```csharp public event StartupEventHandler Startup ``` -------------------------------- ### Get or Set Command Parameter Source: https://doc.opensilver.net/reference/System.Windows.Controls.Primitives.ButtonBase.html Gets or sets the parameter to pass to the Command property. The default is null. ```csharp public object CommandParameter { get; set; } ``` -------------------------------- ### Use IsolatedStorageSettings Source: https://doc.opensilver.net/reference/System.IO.IsolatedStorage.IsolatedStorageSettings.html Demonstrates writing to and reading from application settings. ```csharp //Write in the IsolatedStorageSettings: IsolatedStorageSettings.ApplicationSettings["someKey"] = "someValue"; //Read from it: string value; string myString = IsolatedStorageSettings.ApplicationSettings.TryGetValue("someKey", out value); ``` -------------------------------- ### Get or Set Button Command Source: https://doc.opensilver.net/reference/System.Windows.Controls.Primitives.ButtonBase.html Gets or sets the ICommand to invoke when this button is pressed. The default is null. ```csharp public ICommand Command { get; set; } ``` -------------------------------- ### BeginStoryboard Class Reference Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.BeginStoryboard.html Details regarding the BeginStoryboard class, its constructor, properties, and dependency fields. ```APIDOC ## Class: BeginStoryboard ### Description A trigger action that begins a Storyboard and distributes its animations to their targeted objects and properties. ### Namespace System.Windows.Media.Animation ### Assembly OpenSilver.dll ### Syntax public sealed class BeginStoryboard : TriggerAction, IDependencyObject ### Constructors #### BeginStoryboard() Initializes a new instance of the BeginStoryboard class. ### Fields #### StoryboardProperty Identifies the Storyboard dependency property. - **Type**: DependencyProperty ### Properties #### Storyboard Gets or sets the Storyboard that this BeginStoryboard starts. - **Type**: Storyboard - **Description**: The Storyboard that the BeginStoryboard starts. The default is null. ``` -------------------------------- ### Get Type Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.BubbleDataPoint.html Gets the runtime type of the current instance. This method returns an object that represents the type. ```csharp public Type GetType() ``` -------------------------------- ### Initialize ResourceDictionaryCollection Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.ResourceDictionaryCollection.html Use this constructor to create a new, empty instance of the ResourceDictionaryCollection class. No specific setup is required. ```csharp public ResourceDictionaryCollection() ``` -------------------------------- ### Get ForegroundElements Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.Chart.html Gets the collection of foreground elements. Returns an observable collection of UIElement objects. ```csharp protected ObservableCollection ForegroundElements { get; } ``` -------------------------------- ### Get BackgroundElements Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.Chart.html Gets the collection of background elements. Returns an observable collection of UIElement objects. ```csharp protected ObservableCollection BackgroundElements { get; } ``` -------------------------------- ### Build OpenSilver Project with Release Configuration Source: https://doc.opensilver.net/documentation/how-to-topics/command-line-build.html Specify the 'Release' configuration for your OpenSilver project build using the -p option. ```bash msbuild TestProject.sln -p:Configuration=Release ``` -------------------------------- ### Get Text Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.AutoCompleteBox.html Gets or sets the text displayed in the text box portion of the AutoCompleteBox control. ```csharp public string Text { get; set; } ``` -------------------------------- ### StartupEventHandler Delegate Source: https://doc.opensilver.net/reference/System.Windows.StartupEventHandler.html Represents the method that will handle the Application.Startup event. ```APIDOC ## Delegate StartupEventHandler ### Description Represents the method that will handle the Application.Startup event. ### Namespace System.Windows ### Assembly OpenSilver.dll ### Syntax ```csharp public delegate void StartupEventHandler(object sender, StartupEventArgs e); ``` ### Parameters #### Path Parameters - **sender** (System.Object) - Required - The object that raised the event. - **e** (StartupEventArgs) - Required - The event data. ``` -------------------------------- ### Get Infinite RepeatBehavior Source: https://doc.opensilver.net/reference/System.Windows.Media.Animation.RepeatBehavior.html Use this static property to get a RepeatBehavior that specifies an infinite number of repetitions for a Timeline. ```csharp public static readonly RepeatBehavior Forever { get; } ``` -------------------------------- ### Initialize VisualState Source: https://doc.opensilver.net/reference/System.Windows.VisualState.html Constructor for creating a new instance of the VisualState class. ```csharp public VisualState() ``` -------------------------------- ### Access SelectedValuePath property Source: https://doc.opensilver.net/reference/System.Windows.Controls.Primitives.Selector.html Gets or sets the property path that is used to get the SelectedValue property of the SelectedItem property. ```csharp public string SelectedValuePath { get; set; } ``` -------------------------------- ### Get CanGoForward Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.Frame.html Gets a value that indicates whether there is at least one entry in the forward navigation history. ```csharp public bool CanGoForward { get; } ``` -------------------------------- ### System.Settings Class Source: https://doc.opensilver.net/reference/System.html Documentation for the Settings class. ```APIDOC ## Class: Settings ### Description Provides access to application or system settings. ``` -------------------------------- ### Get CanGoBack Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.Frame.html Gets a value that indicates whether there is at least one entry in the back navigation history. ```csharp public bool CanGoBack { get; } ``` -------------------------------- ### Initialize VideoBrush Source: https://doc.opensilver.net/reference/System.Windows.Media.VideoBrush.html Constructor for creating a new instance of the VideoBrush class. ```csharp [NotImplemented] public VideoBrush() ``` -------------------------------- ### Initialize MultiScaleTileSource Constructors Source: https://doc.opensilver.net/reference/System.Windows.Media.MultiScaleTileSource.html Constructors for initializing the tile source with image and tile dimensions. ```csharp [NotImplemented] public MultiScaleTileSource(int imageWidth, int imageHeight, int tileWidth, int tileHeight, int tileOverlap) ``` ```csharp [NotImplemented] public MultiScaleTileSource(long imageWidth, long imageHeight, int tileWidth, int tileHeight, int tileOverlap) ``` -------------------------------- ### Get and Set SeriesHost Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.Chart.html Gets or sets the Series host of the chart. This property will always return null. ```csharp protected ISeriesHost SeriesHost { get; set; } ``` -------------------------------- ### Get LegendItems Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.Chart.html Gets the collection of legend items. Returns a collection of objects representing legend entries. ```csharp public Collection LegendItems { get; } ``` -------------------------------- ### DataGridDetailsPresenterAutomationPeer Constructor Source: https://doc.opensilver.net/reference/System.Windows.Automation.Peers.DataGridDetailsPresenterAutomationPeer.html Initializes a new instance of the DataGridDetailsPresenterAutomationPeer class. ```APIDOC ## DataGridDetailsPresenterAutomationPeer(DataGridDetailsPresenter owner) ### Description Initializes a new instance of the DataGridDetailsPresenterAutomationPeer class for the specified owner. ### Parameters - **owner** (DataGridDetailsPresenter) - Required - The DataGridDetailsPresenter instance to associate with this peer. ``` -------------------------------- ### DeploymentCatalog Constructors Source: https://doc.opensilver.net/reference/System.ComponentModel.Composition.Hosting.DeploymentCatalog.html Initializes a new instance of the DeploymentCatalog class. ```APIDOC ## DeploymentCatalog() ### Description Initializes a new instance of the DeploymentCatalog class using assemblies in the current XAP. ### Method DeploymentCatalog ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## DeploymentCatalog(String uriRelative) ### Description Initializes a new instance of the DeploymentCatalog class using the XAP file at the specified relative URI. ### Method DeploymentCatalog ### Endpoint N/A ### Parameters #### Path Parameters - **uriRelative** (String) - Required - The URI of the XAP file. ### Request Example None ### Response None ## DeploymentCatalog(Uri uri) ### Description Initializes a new instance of the DeploymentCatalog class using the XAP file at the specified URI. ### Method DeploymentCatalog ### Endpoint N/A ### Parameters #### Path Parameters - **uri** (Uri) - Required - The URI of the XAP file. ### Request Example None ### Response None ``` -------------------------------- ### Get ActualAxes Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.Chart.html Gets the actual axes displayed in the chart. Returns a read-only collection of IAxis objects. ```csharp public ReadOnlyCollection ActualAxes { get; } ``` -------------------------------- ### Get Foreground Brush Source: https://doc.opensilver.net/reference/System.Windows.Controls.Control.html Gets or sets the brush that describes the foreground color of the control. The default value is Black. ```csharp public Brush Foreground { get; set; } ``` -------------------------------- ### Build Project with dotnet CLI Source: https://doc.opensilver.net/documentation/how-to-topics/opensilver-on-mac.html Execute this command in the Terminal to compile your OpenSilver project. ```bash dotnet build ``` -------------------------------- ### Get or Set Hyperlink MouseOverForeground Source: https://doc.opensilver.net/reference/System.Windows.Documents.Hyperlink.html Gets or sets the brush that paints the foreground color when the mouse pointer moves over the Hyperlink. ```csharp public Brush MouseOverForeground { get; set; } ``` -------------------------------- ### Create and Display an Image Source: https://doc.opensilver.net/reference/System.Windows.Controls.Image.html Instantiate an Image control, set its source using a BitmapImage and a Uri, and add it to the visual tree. Ensure the image URI is correctly formatted for the application's resource structure. ```csharp Image image = new Image(); image.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/MyImage.png")); MyStackPanel.Children.Add(image); ``` -------------------------------- ### Initialize DeploymentCatalog with Current XAP Source: https://doc.opensilver.net/reference/System.ComponentModel.Composition.Hosting.DeploymentCatalog.html Initializes a new instance of the DeploymentCatalog class using assemblies in the current XAP. This constructor does not require any parameters. ```csharp public DeploymentCatalog() ``` -------------------------------- ### Get Errors Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.ValidationSummary.html Gets the collection of all errors. This property provides read-only access to the observable collection of validation errors. ```csharp public ObservableCollection Errors { get; } ``` -------------------------------- ### Get IsHovered Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.DataPoint.html Gets a value indicating whether the mouse is hovering over the data point. This property is protected and of type Boolean. ```csharp protected bool IsHovered { get; } ``` -------------------------------- ### Instantiate SilverlightHost Source: https://doc.opensilver.net/reference/System.Windows.Interop.SilverlightHost.html This is the constructor for the SilverlightHost class. It is marked as NotImplemented. ```csharp [NotImplemented] public SilverlightHost() ``` -------------------------------- ### Get and Set LegendTitle Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.Chart.html Gets or sets the Title content of the Legend. Can be any object representing the legend's title. ```csharp public object LegendTitle { get; set; } ``` -------------------------------- ### On Text Input Start Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.AreaDataPoint.html Handles the TextInputStart event for the UIElement. This method is called when text input begins. ```csharp protected virtual void OnTextInputStart(TextCompositionEventArgs e) ``` -------------------------------- ### Get and Set Axes Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.DataVisualization.Charting.Chart.html Gets or sets a collection of Axes in the Chart. Allows modification of the chart's axes. ```csharp public Collection Axes { get; set; } ``` -------------------------------- ### Implement ISupportInitialize Methods Source: https://doc.opensilver.net/reference/System.Windows.Data.CollectionViewSource.html Signals the start and end of object initialization. ```csharp void ISupportInitialize.BeginInit() ``` ```csharp void ISupportInitialize.EndInit() ``` -------------------------------- ### Get ValueMemberBinding Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.AutoCompleteBox.html Gets or sets the Binding used to retrieve values for display in the text portion of the AutoCompleteBox control. ```csharp public Binding ValueMemberBinding { get; set; } ``` -------------------------------- ### Constructor: DomainUpDownAutomationPeer Source: https://doc.opensilver.net/reference/System.Windows.Automation.Peers.DomainUpDownAutomationPeer.html Initializes a new instance of the DomainUpDownAutomationPeer class. ```APIDOC ## Constructor: DomainUpDownAutomationPeer(DomainUpDown owner) ### Description Initializes a new instance of the DomainUpDownAutomationPeer class. ### Parameters - **owner** (DomainUpDown) - Required - The DomainUpDown that is associated with this DomainUpDownAutomationPeer. ``` -------------------------------- ### Receive Data from WebService Source: https://doc.opensilver.net/reference/System.ServiceModel.CSHTML5_ClientBase-1.html Example of initializing a service client and calling an asynchronous method to retrieve data. ```csharp //We create a new instance of the ServiceClient MyServiceClient soapClient = new MyServiceClient( new BasicHttpBinding(), new EndpointAddress( new Uri("http://MyServiceAddress.com/MyService.svc"))); //We call the method that will give us the data we want: var result = await soapClient.GetToDosAsync(_ownerId); //We get the data from the response: ToDoItem[] todos = result.Body.GetToDosResult; ``` -------------------------------- ### Get TextBoxStyle Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.AutoCompleteBox.html Gets or sets the Style applied to the text box portion of the AutoCompleteBox control. Defaults to null. ```csharp public Style TextBoxStyle { get; set; } ``` -------------------------------- ### Begin Initialization Phase Source: https://doc.opensilver.net/reference/System.Windows.ResourceDictionary.html Marks the beginning of the initialization phase for the ResourceDictionary. This is part of a transaction model where BeginInit and EndInit control the initialization state. ```csharp public void BeginInit() ``` -------------------------------- ### Get Parts in DeploymentCatalog Source: https://doc.opensilver.net/reference/System.ComponentModel.Composition.Hosting.DeploymentCatalog.html Gets all the parts contained in the catalog. This property overrides the Parts property from the base ComposablePartCatalog class. ```csharp public override IQueryable Parts { get; } ``` -------------------------------- ### Get Selected Files (Multiple) Source: https://doc.opensilver.net/reference/OpenSilver.Controls.OpenFileDialog.html Use the 'Files' property to get a collection of all selected MemoryFileInfo objects when multi-selection is enabled. ```csharp public IEnumerable Files { get; } ``` -------------------------------- ### OnLaunched Source: https://doc.opensilver.net/reference/System.Windows.Application.html Invoked when the application is launched. Used for initialization and displaying initial content. ```APIDOC ## POST /api/application/launch ### Description Invoked when the application is launched. Override this method to perform application initialization and to display initial content in the associated Window. ### Method POST ### Endpoint /api/application/launch ### Parameters #### Request Body - **args** (LaunchActivatedEventArgs) - Required - Event data for the event. ### Request Example { "args": "{launch_arguments_object}" } ``` -------------------------------- ### Get EntryPointType String Source: https://doc.opensilver.net/reference/System.Windows.Deployment.html Gets a string that identifies the namespace and type name of the class that contains the Application entry point for your application. ```csharp public string EntryPointType { get; } ``` -------------------------------- ### Run Project with dotnet CLI Source: https://doc.opensilver.net/documentation/how-to-topics/opensilver-on-mac.html Use this command in the Terminal to build and run your OpenSilver application. The output will include the URL to access the app in a browser. ```bash dotnet run ``` -------------------------------- ### Constructor: ThumbAutomationPeer(Thumb) Source: https://doc.opensilver.net/reference/System.Windows.Automation.Peers.ThumbAutomationPeer.html Initializes a new instance of the ThumbAutomationPeer class. ```APIDOC ## ThumbAutomationPeer(Thumb) ### Description Initializes a new instance of the ThumbAutomationPeer class. ### Parameters #### Request Body - **owner** (Thumb) - Required - The Thumb to associate with the ThumbAutomationPeer. ``` -------------------------------- ### Get or Set DataTemplate DataType Source: https://doc.opensilver.net/reference/System.Windows.DataTemplate.html Gets or sets the type for which this DataTemplate is intended. Setting this property with a non-System.Type value will throw an ArgumentException. ```csharp public Type DataType { get; set; } ``` -------------------------------- ### Create OpenSilver Application with MAUI Hybrid Launcher via CLI Source: https://doc.opensilver.net/documentation/general/maui-hybrid-launcher.html Commands to generate a new OpenSilver project with MAUI support for either all platforms or specific target platforms. ```bash dotnet new opensilverapp -o MyAppName --mauiPlatforms all ``` ```bash dotnet new opensilverapp -o MyAppName --mauiPlatforms android windows ``` -------------------------------- ### Get or Set Target Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.ValidationSummary.html Gets or sets the UIElement for which validation errors will be displayed in the summary. This links the summary to a specific control. ```csharp public UIElement Target { get; set; } ``` -------------------------------- ### Get HasErrors Property Source: https://doc.opensilver.net/reference/System.Windows.Controls.ValidationSummary.html Gets a value indicating whether the ValidationSummary has any errors. This read-only property reflects the overall error status. ```csharp public bool HasErrors { get; } ``` -------------------------------- ### OnCreateAutomationPeer() Method Source: https://doc.opensilver.net/reference/System.Windows.Controls.DomainUpDown.html Returns a DomainUpDownAutomationPeer for use by the Silverlight automation infrastructure. ```APIDOC ## OnCreateAutomationPeer() ### Description Returns a DomainUpDownAutomationPeer for use by the Silverlight automation infrastructure. ### Declaration ```csharp protected override AutomationPeer OnCreateAutomationPeer() ``` ### Returns Type | Description ---|--- AutomationPeer | The class-specific AutomationPeer subclass to return. ### Overrides UIElement.OnCreateAutomationPeer() ``` -------------------------------- ### Create Canvas in C# Source: https://doc.opensilver.net/reference/System.Windows.Controls.Canvas.html Example of programmatically creating and configuring a Canvas instance in C#. ```csharp Canvas myCanvas = new Canvas(); myCanvas.Width = 100; myCanvas.Height = 100; myCanvas.Background = new SolidColorBrush(Windows.UI.Colors.Blue); myCanvas.HorizontalAlignment=HorizontalAlignment.Left; ```