M
M
Michael2021-01-19 14:25:12
WPF
Michael, 2021-01-19 14:25:12

What's wrong with UC?

Hello. There is an application and there is a WPF UserControl Library. In the library I want to store UCs that will be connected when clicked. In the UC library, I created the UserControl1 file, I create a TextBlock

<UserControl x:Class="TestUI.UserControl1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:TestUI"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <TextBlock Text="Проверка" />
    </Grid>
</UserControl>

I run the project and I see an error
недопустимый код XML "Недопустимый знак для указанной кодировки., строка 10, позиция 26.".	TestUI	C:\repos\Test\TestUI\UserControl1.xaml	10

If you write in English, then everything is fine. What is it connected with? Project in UTF-8

Upd: That is, there is TestCore and TestUI in TestCore, I click on the button and the control is loaded from TestUI, but I get this error when compiling

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2021-01-19
@mscrack

In general, I added it to UC <?xml version="1.0" encoding="windows-1251"?>and it all worked. It's strange, if anyone has come across and solved this problem in a different way, write

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question