svick / xaml-conversion Goto Github PK
View Code? Open in Web Editor NEWConverts XAML code into C#
Converts XAML code into C#
Hi,
Using this source as a reference for converting the .xaml to c#, the xaml string given in the demo app works perfectly , but when i change the xaml string to any other xaml string as given below. Get the null reference error for XAML Type, is it related to dll files that are being loaded by default from GAC ?
Please let me know .
//
string xaml = @"<Activity mc:Ignorable=""sap sap2010"" x:Class=""DisplayMessage_Chash"" sap2010:ExpressionActivityEditor.ExpressionActivityEditor=""C#"" sap:VirtualizedContainerService.HintSize=""721.6,610.4"" sap2010:WorkflowViewState.IdRef=""ActivityBuilder_1"" xmlns=""http://schemas.microsoft.com/netfx/2009/xaml/activities"" xmlns:mc=""http://schemas.openxmlformats.org/markup-compatibility/2006"" xmlns:sap=""http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"" xmlns:sap2010=""http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"" xmlns:scg=""clr-namespace:System.Collections.Generic;assembly=System.Private.CoreLib"" xmlns:sco=""clr-namespace:System.Collections.ObjectModel;assembly=System.Private.CoreLib"" xmlns:ui=""http://schemas.uipath.com/workflow/activities"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments=""x:String"">
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Text</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>GlobalVariablesNamespace</x:String>
<x:String>GlobalConstantsNamespace</x:String>
<x:String>System.Linq.Expressions</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<scg:List x:TypeArguments=""AssemblyReference"" Capacity=""22"">
Microsoft.CSharp
System
System.Core
System.Activities
System.Data
System.Runtime.Serialization
System.ServiceModel
System.ServiceModel.Activities
System.Xaml
System.Activities
Microsoft.VisualBasic
System.Private.CoreLib
System.Data
System
System.Core
System.Xml
System.Xml.Linq
System.Xaml
UiPath.System.Activities
UiPath.UiAutomation.Activities
UiPath.Studio.Constants
</scg:List>
</TextExpression.ReferencesForImplementation>
<Sequence DisplayName=""DisplayMessage_Chash"" sap:VirtualizedContainerService.HintSize=""400,175.2"" sap2010:WorkflowViewState.IdRef=""Sequence_1"">
sap:WorkflowViewStateService.ViewState
<scg:Dictionary x:TypeArguments=""x:String, x:Object"">
<x:Boolean x:Key=""IsExpanded"">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:MessageBox Caption=""{x:Null}"" ChosenButton=""{x:Null}"" AutoCloseAfter=""00:00:00"" DisplayName=""Message Box"" sap:VirtualizedContainerService.HintSize=""356.8,85.6"" sap2010:WorkflowViewState.IdRef=""MessageBox_1"">
ui:MessageBox.Text
<InArgument x:TypeArguments=""x:Object"">
<CSharpValue x:TypeArguments=""x:Object"" sap2010:WorkflowViewState.IdRef=""CSharpValue`1_1"">""Test Message""
</ui:MessageBox.Text>
</ui:MessageBox>
";
////
Hi, can you guide how to use this library code? Like
XamlConvertor myConvertor = new XamlConvertor();
myLabel.Content = myConvertor.ConvertToString("?");
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.