This is a migrated thread and some comments may be shown as answers.

Cyrillic after deserialization

1 Answer 59 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Svyatoslav
Top achievements
Rank 1
Svyatoslav asked on 07 Mar 2017, 12:11 PM

After deserialization Cyrillic is displayed as unknown characters, could you suggest how to fix it?

public void diagram_ShapeDeserialized(object sender, Telerik.Windows.Controls.Diagrams.ShapeSerializationRoutedEventArgs e)
        {
            try
            {
                if (e.Shape is FunctionShape)
                {
                    FunctionShape shape = e.Shape as FunctionShape;

                    if (e.SerializationInfo["DisplayName"] != null)
                        shape.DisplayName = e.SerializationInfo["DisplayName"].ToString();

                  }

             }
        }

 

For example, this function

 

<FunctionItem>
      <DisplayName>ИЛИ</DisplayName>
      <FunctionName>OR</FunctionName>
      <InputCount>2</InputCount>
      <OutputCount>1</OutputCount>
      <Code>//OR Gate
IN(data0)
OR(data1)
OUT(out0)
</Code>
      <FunctionType>Logic</FunctionType>
      <LeftEdge>0</LeftEdge>
      <RightEdge>1</RightEdge>
      <Data>M 281,290L 319,290C 319.552,290 320,289.552 320,289L 320,251C 320,250.448 319.552,250 319,250L 281,250C 280.448,250 280,250.448 280,251L 280,289C 280,289.552 280.448,290 281,290 Z M 280,260L 270,260M 280,280L 270,280M 320,270L 330,270M 302.569,264.156L 307.476,262.656M 302.493,277.666L 312.288,277.666M 307.455,277.385L 307.455,262.228M 287.814,277.664L 296.856,277.664M 287.731,275.747L 296.819,271.106M 287.814,266.164L 296.788,271.278</Data>
      <Width>60</Width>
      <Height>40</Height>
      <Stroke>#FF000000</Stroke>
      <Fill>#FFFF7D00</Fill>
      <StrokeThickness>1</StrokeThickness>
      <Connectors>
        <FunctionItemConnector>
<PinNomber>1</PinNomber>
          <X>0</X>
          <Y>0.25</Y>
          <Direction>Input</Direction>
        </FunctionItemConnector>
        <FunctionItemConnector>
<PinNomber>2</PinNomber>
          <X>0</X>
          <Y>0.75</Y>
          <Direction>Input</Direction>
        </FunctionItemConnector>
        <FunctionItemConnector>
<PinNomber>1</PinNomber>
          <X>1</X>
          <Y>0.5</Y>
          <Direction>Output</Direction>
        </FunctionItemConnector>
      </Connectors>
      <Index>3</Index>
    </FunctionItem>

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Mar 2017, 04:15 PM
Hello Svyatoslav,

I tested the reported scenario and it seems that this is an issue with the diagram serialization process. I logged it in our feedback portal where you can track its status and vote for an implementation. I also updated your Telerik points.

If you share what exactly you are doing to achieve the reported issue also in the toolbox I can think of a possible workaround. You can share some runnable code snippets.

Regards,
Martin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Diagram
Asked by
Svyatoslav
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or