These are chat archives for AvaloniaUI/Avalonia

21st
Apr 2018
Steven Kirk
@grokys
Apr 21 2018 11:20 UTC
hey all, AvaloniaUI/Avalonia#1513 requires a Portable.Xaml PR to be brought over to our fork. would anyone be able to do that? i'm away from home at the moment so might not get chance for a while
Wiesław Šoltés
@wieslawsoltes
Apr 21 2018 11:35 UTC

@jmacato I have my main view:

<Carousel Items="{Binding Views}" SelectedItem="{Binding CurrentView, Mode=TwoWay}" IsVirtualized="False">

in current view (dashboard) I have button with command:

<Button Content="New Project" Classes="project" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="1" Command="{Binding OnNewProject}">

when I click on the button in code behind (OnNewProject) I change the CurrentView to editor than the app freezes when using CoreRT :(

I did try content control, same result.
Jumar Macato
@jmacato
Apr 21 2018 11:48 UTC
@wieslawsoltes :( i'll try if i can replicate that on linux too (havent done anything yet coz i was busy)
Wiesław Šoltés
@wieslawsoltes
Apr 21 2018 11:51 UTC
The issue is strange, because I can change view using different command from MenuItem :worried:
        <MenuItem Header="_View">
            <MenuItem Header="_Views" Items="{Binding Views}">
                <MenuItem.Styles>
                    <Style Selector="MenuItem">
                        <Setter Property="Header" Value="{Binding Title}"/>
                        <Setter Property="Command" Value="{Binding $parent[UserControl].DataContext.OnChangeCurrentView}"/>
                        <Setter Property="CommandParameter" Value="{Binding}"/>
                        <Setter Property="Icon">
                            <Template>
                                <CheckBox Name="icon" Classes="menu">
                                    <i:Interaction.Behaviors>
                                        <iac:BindTagToVisualRootDataContextBehavior/>
                                    </i:Interaction.Behaviors>
                                    <CheckBox.IsChecked>
                                        <MultiBinding Mode="OneWay" Converter="{x:Static converters:ObjectEqualityMultiConverter.Instance}">
                                            <Binding ElementName="icon" Path="DataContext" Converter="{x:Static converters:ObjectToObjectConverter.Instance}"/>
                                            <Binding ElementName="icon" Path="Tag.CurrentView" Converter="{x:Static converters:ObjectToObjectConverter.Instance}"/>
                                        </MultiBinding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                            </Template>
                        </Setter>
                    </Style>
                </MenuItem.Styles>
            </MenuItem>
        </MenuItem>
Steven Kirk
@grokys
Apr 21 2018 13:01 UTC
ok @jmacato pointed out that AvaloniaUI/Portable.Xaml#1 is already pointing at our fork
i think if we merge that PR into a branch on our fork then AvaloniaUI/Avalonia should have access to it?
could someone do that if possible?
Ivan Kochurkin
@KvanTTT
Apr 21 2018 19:11 UTC
image.png
ControlCatalog does not work on my Win 7 again ;(
But it's ok on Win 10.