AvaloniaUtils / DialogHost.Avalonia

AvaloniaUI control that provides a simple way to display a dialog with information or prompt the user when information is needed
MIT License
228 stars 15 forks source link

`Datagrid` unable to input text in `DialogHost` #47

Open Coloryr opened 4 months ago

Coloryr commented 4 months ago

I put a datagrid in dialoghost, but it can be edit

<dialog:DialogHost DisableOpeningAnimation="True" Identifier="Main">
    <dialog:DialogHost.DataTemplates>
        <DataTemplate DataType="vm:AddAskModel">

            ....

            <DataGrid
                Width="200"
                Height="150"
                Margin="5,0,0,0"
                AutoGenerateColumns="False"
                CanUserResizeColumns="True"
                CanUserSortColumns="False"
                ItemsSource="{Binding ServerList}">
                <DataGrid.Columns>
                    <DataGridTextColumn
                        Binding="{Binding Name}"
                        Header="执行的服务器"
                        IsReadOnly="False" />
                </DataGrid.Columns>
            </DataGrid>
        </DataTemplate>
    </dialog:DialogHost.DataTemplates>

....

GIF

To be precise, it is impossible to input text after selecting it

SKProCH commented 4 months ago

Hello, @Coloryr

To be honest, I didn't understand what the problem was. Can you rephrase it? It might be worth specifying the expected behavior and the actual behavior also.

Coloryr commented 4 months ago

It may be a problem with the Chinese input method. When I input English, I can input it all at once, but inputting Chinese through Pinyin is not possible

SKProCH commented 4 months ago

That affects only DataGrid inside Dialogs?

Coloryr commented 4 months ago

That affects only DataGrid inside Dialogs?

yes, code in here

Coloryr commented 4 months ago

https://github.com/AvaloniaUtils/DialogHost.Avalonia/assets/26276037/96235da2-868e-4818-8430-49d9f21aec0d

When select any text, and the border color become black, it can't input any chat, ~re~focus the datagrid with not select text, that can be input chat