These are chat archives for AvaloniaUI/Avalonia

17th
Dec 2015
Steven Kirk
@grokys
Dec 17 2015 00:10 UTC
memory leaks seem to be drastically down after the latest changes
Direct2D is still using a crap ton on memory, but at least it's not leaking so much
main thing that appears to now be leaking in test app is text page
maybe html renderer?
yep, i think it's HtmlRenderer - XamlTestApp which doesn't have it doesn't seem to leak any more
(well it is leaking ever so slightly)
just need to work out why managed memory is at 12mb and unmanaged at 84mb!
Steven Kirk
@grokys
Dec 17 2015 01:12 UTC
ok, so the unmanaged memory usage isn't from Direct2D
get the same results from skia
Nikita Tsukanov
@kekekeks
Dec 17 2015 08:38 UTC

they say the new project.json stuff should fix that problem, so we'll see

It has some serious issues with embedded resources

danwalmsley
@danwalmsley
Dec 17 2015 14:09 UTC
guys quick mef question...
when you do container.SatifsyImports...
or locally in each class that has imports...
do you do this in 1 place for the entire application?
i.e. I have ILanguageService...
and I want to import CPlusPlusLanguageService...
but not sure if i do this from the main avalonstudio program
or in the AvalonStudio.Languages assembly?
Darnell Williams
@Seeker1437
Dec 17 2015 14:26 UTC
From my understanding the container is in the main program, that will register the catalog of objects from any loaded assembly that is configured for either
danwalmsley
@danwalmsley
Dec 17 2015 15:29 UTC
@grokys I've replied to #364
Steven Kirk
@grokys
Dec 17 2015 15:33 UTC
replied with a solution
danwalmsley
@danwalmsley
Dec 17 2015 15:36 UTC
@grokys cheers
@grokys replied again..
@grokys without being cheeky... if your looking at issues... IScrollInfo ;)
Steven Kirk
@grokys
Dec 17 2015 15:38 UTC
yes, i know ;)
Steven Kirk
@grokys
Dec 17 2015 16:04 UTC
ok, just committed a change that should allow you to set MenuItem b/g color
Darnell Williams
@Seeker1437
Dec 17 2015 16:10 UTC
I got to watch it :D
that was cool!
danwalmsley
@danwalmsley
Dec 17 2015 16:34 UTC
@grokys im happy now thanks for fix
blob
Steven Kirk
@grokys
Dec 17 2015 16:34 UTC
cool!
we need style variables in order to do that stuff properly
danwalmsley
@danwalmsley
Dec 17 2015 16:35 UTC
that will allow me to have a theme and change all colours on the fly?
Darnell Williams
@Seeker1437
Dec 17 2015 16:39 UTC
isn't that would DynamicResource could do?
Gutemberg Ribeiro
@galvesribeiro
Dec 17 2015 17:50 UTC
@kekekeks this hardware would work ok? http://www.perto.com.br/en/veloh.html
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 18:10 UTC
Core2D-PerspexUpdate.PNG
@grokys A lot has changed after the latest merges :(
Something weird is happening with styles
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 18:16 UTC
I am getting this exception :
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Core2D.Perspex.vshost.exe Error: 0 : Obiekt docelowy wywołania zgłosił wyjątek.
   w System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   w System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   w System.Delegate.DynamicInvokeImpl(Object[] args)
   w Perspex.Interactivity.RoutedEvent.InvokeClassHandlers(Object sender, RoutedEventArgs e)
   w Perspex.Interactivity.Interactive.RaiseEventImpl(RoutedEventArgs e)
   w Perspex.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
   w Perspex.Input.MouseDevice.SetPointerOver(IPointerDevice device, IInputRoot root, IList`1 elements)
   w Perspex.Input.MouseDevice.MouseMove(IMouseDevice device, IInputRoot root, Point p, InputModifiers inputModifiers)
   w Perspex.Input.MouseDevice.ProcessRawEvent(RawMouseEventArgs e)
   w System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
   w System.Reactive.Linq.ObservableImpl.Where`1._.OnNext(TSource value)
   w System.Reactive.Linq.ObservableImpl.OfType`2._.OnNext(TSource value)
   w System.Reactive.Observer`1.OnNext(T value)
   w Perspex.Input.InputManager.Process(RawInputEventArgs e)
   w Perspex.Controls.TopLevel.HandleInput(RawInputEventArgs e)
   w Perspex.Controls.Platform.PlatformManager.WindowDecorator.OnInput(RawInputEventArgs obj)
   w Perspex.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   w Perspex.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   w Perspex.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
   w Perspex.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   w Perspex.Application.Run(ICloseable closable)
   w Core2D.Perspex.App.Start() w C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\App.paml.cs:wiersz 121
when moving mouse over some control
for example this style is not working
        <Style Selector="TabItem.property">
            <Setter Property="Margin" Value="3"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontWeight" Value="Normal"/>
        </Style>
Styles are applied only after I move the mouse over them
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 18:34 UTC
@grokys Look like styles are working differently now
When I disable all styles I get it working
But there is second issue:
Exception thrown: 'System.NullReferenceException' in Perspex.Controls.dll
Core2D.Perspex.vshost.exe Error: 0 : Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w Perspex.Controls.ItemsControl.OnTemplateChanged(PerspexPropertyChangedEventArgs e)
   w Perspex.PerspexObjectExtensions.SubscribeAdapter[TTarget](PerspexPropertyChangedEventArgs e, Func`2 handler)
   w Perspex.PerspexObjectExtensions.<>c__DisplayClass1_0`1.<AddClassHandler>b__0(PerspexPropertyChangedEventArgs e)
   w System.Reactive.AnonymousObserver`1.OnNextCore(T value)
   w System.Reactive.ObserverBase`1.OnNext(T value)
   w System.Reactive.Observer`1.OnNext(T value)
   w Perspex.PerspexObject.RaisePropertyChanged(PerspexProperty property, Object oldValue, Object newValue, BindingPriority priority)
   w Perspex.PerspexObject.<>c__DisplayClass46_0.<CreatePriorityValue>b__1(Tuple`2 x)
   w System.Reactive.AnonymousObserver`1.OnNextCore(T value)
   w System.Reactive.ObserverBase`1.OnNext(T value)
   w Perspex.PriorityValue.UpdateValue(Object value, Int32 priority)
   w Perspex.PriorityValue.ValueChanged(PriorityLevel level)
   w Perspex.PriorityLevel.ActivateFirstBinding()
   w Perspex.PriorityLevel.Completed(PriorityBindingEntry entry)
   w Perspex.PriorityBindingEntry.<>c__DisplayClass17_0.<Start>b__1()
   w System.Reactive.AnonymousObserver`1.OnCompletedCore()
   w System.Reactive.ObserverBase`1.OnCompleted()
   w System.Reactive.AutoDetachObserver`1.OnCompletedCore()
   w System.Reactive.ObserverBase`1.OnCompleted()
   w System.Reactive.SafeObserver`1.OnCompleted()
   w System.Reactive.Linq.ObservableImpl.Select`2._.OnCompleted()
   w System.Reactive.Linq.ObservableImpl.TakeUntil`2._.O.OnNext(TOther value)
   w System.Reactive.Observer`1.OnNext(T value)
   w Perspex.Controls.Control.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
   w Perspex.Controls.Control.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
   w Perspex.Controls.Control.Perspex.Controls.ISetLogicalParent.SetParent(ILogical parent)
   w Perspex.Controls.Control.ClearLogicalParent(IEnumerable`1 children)
   w Perspex.Controls.Control.LogicalChildrenCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   w Perspex.Collections.PerspexList`1.NotifyRemove(IList t, Int32 index)
   w Perspex.Collections.PerspexList`1.Remove(T item)
   w Perspex.Controls.Mixins.ContentControlMixin.UpdateLogicalChild(IPerspexList`1 logicalChildren, Object oldValue, Object newValue)
   w Perspex.Controls.Mixins.ContentControlMixin.<>c__DisplayClass1_1`1.<Attach>b__1(IControl child)
   w System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
   w System.Reactive.Linq.ObservableImpl.Cast`2._.OnNext(TSource value)
   w System.Reactive.AutoDetachObserver`1.OnNextCore(T value)
   w System.Reactive.ObserverBase`1.OnNext(T value)
   w Perspex.PerspexObject.<>c__DisplayClass26_1.<GetObservable>b__1(Object s, PerspexPropertyChangedEventArgs e)
   w System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   w Perspex.PerspexObject.RaisePropertyChanged(PerspexProperty property, Object oldValue, Object newValue, BindingPriority priority)
   w Perspex.PerspexObject.SetAndRaise[T](PerspexProperty`1 property, T& field, T value)
   w Perspex.Controls.Presenters.ContentPresenter.CreateChild()
   w Perspex.Controls.Presenters.ContentPresenter.ApplyTemplate()
   w Perspex.Layout.Layoutable.MeasureCore(Size availableSize)
   w Perspex.Controls.Presenters.ContentPresenter.MeasureCore(Size availableSize)
   w Perspex.Layout.Layoutable.Measure(Size availableSize, Boolean force)
   w Perspex.Controls.Border.MeasureOverride(Size availableSize)
   w Perspex.Layout.Layoutable.MeasureCore(Size availableSize)
   w Perspex.Layout.Layoutable.Measure(Size availableSize, Boolean force)
   w Perspex.Layout.Layoutable.MeasureOverride(Size availableSize)
   w Perspex.Layout.Layoutable.MeasureCore(Size availableSize)
   w Perspex.Layout.Layoutable.Measure(Size availableSize, Boolean force)
Steven Kirk
@grokys
Dec 17 2015 18:44 UTC
@wieslawsoltes yeah, it was a pretty big change
i'm try to build Core2D now
i think i need to add a package source for the behaviors. what is the URL?
Steven Kirk
@grokys
Dec 17 2015 20:15 UTC
@danwalmsley I've got an initial implementation of "IScrollInfo" done
i've called it IScrollable because what's "info" got to do with it?
if i put it on a branch does that make it hard for you to try it out?
just 4 members so far - a lot simpler than WPF's
though paging etc isn't implemented as our scrollbars don't support that yet
Darnell Williams
@Seeker1437
Dec 17 2015 21:00 UTC
@grokys is there a way to retrieve an instance of the Thread from Dispatcher
Steven Kirk
@grokys
Dec 17 2015 21:02 UTC
doesn't seem like there's a way currently, no
why do you need it?
probably the easiest thing is just to store the current thread in Main or somewhere
Darnell Williams
@Seeker1437
Dec 17 2015 21:03 UTC
hmmm okay
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:16 UTC

i think i need to add a package source for the behaviors. what is the URL?

@grokys https://www.myget.org/F/xamlbehaviors-nightly/api/v2

danwalmsley
@danwalmsley
Dec 17 2015 21:24 UTC
@grokys ok ready to try out IScrollable... I think I will have to use the submodule then, or is there a downloadable nuget package somewhere?
Steven Kirk
@grokys
Dec 17 2015 21:26 UTC
i guess i can push it to master and generate a nuget
i don't think it should break anything and Core2D is already broken
danwalmsley
@danwalmsley
Dec 17 2015 21:28 UTC
:D thanks
strange iv not noticed anything broken yet... maybe im not looking hard enough
Steven Kirk
@grokys
Dec 17 2015 21:29 UTC
yeah, maybe @wieslawsoltes just uses different features
Darnell Williams
@Seeker1437
Dec 17 2015 21:30 UTC
oh yeah @grokys what was our system for Culture stuff?
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:35 UTC

yeah, maybe @wieslawsoltes just uses different features

Styles and DataTemplate are used a lot

oh and tons of UserControl
danwalmsley
@danwalmsley
Dec 17 2015 21:36 UTC
iv not used too many styles yet..
Darnell Williams
@Seeker1437
Dec 17 2015 21:37 UTC
I will be :D
hehehe :3
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:39 UTC
@grokys How does TabControl work whats relation between TabStripItem and TabItem ?
Steven Kirk
@grokys
Dec 17 2015 21:41 UTC
it's a strange one
i'm still trying to think of a way not to need TabStripItem
basically: TabItem contains both a header and content
TabItem's logical parent needs to be TabControl in order for the Template to be applied
which means that TabStrip can't hold TabItems as the TabItem already has a logical parent
Darnell Williams
@Seeker1437
Dec 17 2015 21:43 UTC
@grokys when implementing my control, should I make it use INPC or just use ReactiveObject stuff?
(Whatever makes it ready for master)
Steven Kirk
@grokys
Dec 17 2015 21:44 UTC
so instead the TabStrip selects the Header property from the TabItem and puts it into a new control, TabStripItem
if that makes sense
@ImaBrokeDude that depends
what sort of control are you implementing?
Darnell Williams
@Seeker1437
Dec 17 2015 21:45 UTC
Calendar
Steven Kirk
@grokys
Dec 17 2015 21:46 UTC
if it's an application-specific control you'll probably want to create a ViewModel specific to that control
if it's a general-purpose control you probably don't want to use a ViewModel and instead use bindings
for a Calendar, you probably wouldn't have a ViewModel I'm guessing
Darnell Williams
@Seeker1437
Dec 17 2015 21:48 UTC
Ah what might help as bit is that I am building a subclass I guess you would call it? it in itself will be used by the control.
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:48 UTC

so instead the TabStrip selects the Header property from the TabItem and puts it into a new control, TabStripItem

But Style is applied to TabItem ?

Steven Kirk
@grokys
Dec 17 2015 21:48 UTC
no, TabItem doesn't actually appear in the visual tree
it's weird and i don't like it, but i couldn't work out a better way to do it
Darnell Williams
@Seeker1437
Dec 17 2015 21:49 UTC
so basically TabItem is like an encapsulation object?
Steven Kirk
@grokys
Dec 17 2015 21:49 UTC
WPF is different because styles work differently
yeah
WPF uses ItemContainerStyle to work around the issue i think
but i want to be able to apply styles like e.g. ListBox > ListBoxItem
so item control items need to be in the logical tree even if they're created from data templates
which doesn't happen in WPF
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:51 UTC
Yeah but this does not works now:
        <Style Selector="TabStripItem.property">
            <Setter Property="Margin" Value="3"/>
        </Style>
Steven Kirk
@grokys
Dec 17 2015 21:51 UTC
hmm, because you're applying the property class to TabItem?
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:51 UTC
yes
Steven Kirk
@grokys
Dec 17 2015 21:52 UTC
yes, that is indeed a problem i've not thought of
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:52 UTC
                <TabItem Header="Project" Classes="property">
                    <project:ProjectControl DataContext="{Binding Path=Project, Mode=TwoWay}"/>
                </TabItem>
Steven Kirk
@grokys
Dec 17 2015 21:53 UTC
could you try making the Header property a TabStripItem?
and applying the class to that?
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:55 UTC
not sure how
Steven Kirk
@grokys
Dec 17 2015 21:56 UTC
<TabItem>
    <TabItem.Header>
        <TabStripItem Classes="property">Project</TabStripItem>
    </TabItem.Header>
    <project:ProjectControl DataContext="{Binding Path=Project, Mode=TwoWay}"/>
</TabItem>
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 21:57 UTC
The Designer is just killing VS :(
Darnell Williams
@Seeker1437
Dec 17 2015 21:58 UTC

@grokys

oh yeah what was our system for Culture stuff?

Do we have Localization/Internationalization support in Perspex?

Steven Kirk
@grokys
Dec 17 2015 21:59 UTC
nope, nothing ;)
Darnell Williams
@Seeker1437
Dec 17 2015 22:00 UTC
a okay. the basic control will use american time stamp :3
Steven Kirk
@grokys
Dec 17 2015 22:00 UTC
oh... you don't need perspex support for displaying dates
i thought you meant like right to left support etc
you just use the standard .net classes for displaying dates
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:01 UTC
<TabItem>
    <TabItem.Header>
        <TabStripItem Classes="property">Project</TabStripItem>
    </TabItem.Header>
    <project:ProjectControl DataContext="{Binding Path=Project, Mode=TwoWay}"/>
</TabItem>
Does not help
Steven Kirk
@grokys
Dec 17 2015 22:02 UTC
@ImaBrokeDude i'm not sure why you need that for displaying dates
@wieslawsoltes oh :(
ok, i need to try and work something out for that
Darnell Williams
@Seeker1437
Dec 17 2015 22:03 UTC
It switches which year is at the beginning or end of the string.
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:03 UTC
@grokys
    public class TabStripItem : ListBoxItem
    {
    }
Steven Kirk
@grokys
Dec 17 2015 22:03 UTC
yeah
Darnell Williams
@Seeker1437
Dec 17 2015 22:03 UTC
for left to right it's 2001 - 2010
for right to left is 2010 - 2001
Steven Kirk
@grokys
Dec 17 2015 22:03 UTC
??!?!
ahhh
sorry
danwalmsley
@danwalmsley
Dec 17 2015 22:04 UTC
@grokys ISrollInfo
Steven Kirk
@grokys
Dec 17 2015 22:04 UTC
ok i get you
danwalmsley
@danwalmsley
Dec 17 2015 22:04 UTC
iv implemented it on my textview... but scrolloffset doesnt get set
Steven Kirk
@grokys
Dec 17 2015 22:04 UTC
have you looked at the example implementation?
danwalmsley
@danwalmsley
Dec 17 2015 22:05 UTC
im assuming that the ScrollViewer sees my control implements IScrollable and then those should get set?
yes iv tried to keep as close to that as possible...
the Action InvalidateScroll... what am I supposed to do with that?
Darnell Williams
@Seeker1437
Dec 17 2015 22:06 UTC
because of that, right now I will just use Left to Right as default for the time being :3
Steven Kirk
@grokys
Dec 17 2015 22:06 UTC
yeah, just use LtoR for now
please let me know what's not clear and i will add to the documentation
is that property getting set by the ScrollViewer?
danwalmsley
@danwalmsley
Dec 17 2015 22:09 UTC
@grokys not its clear, im just not seeing that property get set for some reason
Steven Kirk
@grokys
Dec 17 2015 22:09 UTC
strange
go into devtools, and make sure your control is the logical child of a ScrollViewer
danwalmsley
@danwalmsley
Dec 17 2015 22:12 UTC
hmm in the Visual Tree there is a ScrollViewer
but in the logical tree there isnt
Steven Kirk
@grokys
Dec 17 2015 22:12 UTC
so the parent ScrollViewer comes from a control template?
danwalmsley
@danwalmsley
Dec 17 2015 22:13 UTC
yes
Steven Kirk
@grokys
Dec 17 2015 22:13 UTC
ok, that shouldn't be a problem
danwalmsley
@danwalmsley
Dec 17 2015 22:13 UTC
ok but also
<ScrollViewer CanScrollHorizontally="{TemplateBinding CanScrollHorizontally}"
                        HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
                        VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}">
              <Grid Margin="0 0" ColumnDefinitions="Auto, *">
                <StackPanel Orientation="Horizontal" Name="marginContainer"/>
                <tv:TextView Name="textView" HorizontalAlignment="Stretch" Margin="0, 0" Grid.Column="1" 
                                CaretIndex="{TemplateBinding CaretIndex}"
                                SelectionStart="{TemplateBinding SelectionStart}"
                                SelectionEnd="{TemplateBinding SelectionEnd}"
                                Foreground="{TemplateBinding Foreground}"
                                TextDocument="{TemplateBinding TextDocument}"/>
                <ContentPresenter Content="{TemplateBinding Content}" Grid.Column="1" IsHitTestVisible="false"
                           Margin="{TemplateBinding Margin}"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Top"/>
              </Grid>            
          </ScrollViewer>
this might be problem
the textview is wrapped in a grid..
Steven Kirk
@grokys
Dec 17 2015 22:13 UTC
right, that'll be it!
can you do that in WPF?
danwalmsley
@danwalmsley
Dec 17 2015 22:14 UTC
no
I dont think so
Steven Kirk
@grokys
Dec 17 2015 22:14 UTC
me neither
so yeah, your IScrollable needs to be the content of a ScrollViewer
the margin needs to scroll as well right?
danwalmsley
@danwalmsley
Dec 17 2015 22:15 UTC
yes exactly the same as the textview
so perhaps I need a seperate template for textview?
Steven Kirk
@grokys
Dec 17 2015 22:15 UTC
yeah, so it needs to be within the IScrollable
danwalmsley
@danwalmsley
Dec 17 2015 22:16 UTC
I can do that with an extra template then?
Steven Kirk
@grokys
Dec 17 2015 22:16 UTC
you could yeah
but it doesn't sound right to me, how will you scroll the margin?
how does AvalonEdit do it?
danwalmsley
@danwalmsley
Dec 17 2015 22:18 UTC
if I have a template for textview... then the textview will become <Grid><StackPanel><TextView><ContentPrensenter>
i'll have to go back and look
the margins are inside the textview control..
ok I think that I can do that
render the margins inside the TextView render loop
that makes more sense
Steven Kirk
@grokys
Dec 17 2015 22:19 UTC
that's what i would've suggested
danwalmsley
@danwalmsley
Dec 17 2015 22:21 UTC
I still need to get a ContentPresenter inside the TextView,,, so I can overlay controls. like the intellisense control
but since textview is not a TemplatedControl that wont be possible?
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:22 UTC
@grokys Regarding this exception:
Exception thrown: 'System.NullReferenceException' in Perspex.Controls.dll
Core2D.Perspex.vshost.exe Error: 0 : Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w Perspex.Controls.ItemsControl.OnTemplateChanged(PerspexPropertyChangedEventArgs e)
   w Perspex.PerspexObjectExtensions.SubscribeAdapter[TTarget](PerspexPropertyChangedEventArgs e, Func`2 handler)
   w Perspex.PerspexObjectExtensions.<>c__DisplayClass1_0`1.<AddClassHandler>b__0(PerspexPropertyChangedEventArgs e)
   w System.Reactive.AnonymousObserver`1.OnNextCore(T value)
   w System.Reactive.ObserverBase`1.OnNext(T value)
   w System.Reactive.Observer`1.OnNext(T value)
   w Perspex.PerspexObject.RaisePropertyChanged(PerspexProperty property, Object oldValue, Object newValue, BindingPriority priority)
   w Perspex.PerspexObject.<>c__DisplayClass46_0.<CreatePriorityValue>b__1(Tuple`2 x)
   w System.Reactive.AnonymousObserver`1.OnNextCore(T value)
   w System.Reactive.ObserverBase`1.OnNext(T value)
   w Perspex.PriorityValue.UpdateValue(Object value, Int32 priority)
   w Perspex.PriorityValue.ValueChanged(PriorityLevel level)
   w Perspex.PriorityLevel.ActivateFirstBinding()
   w Perspex.PriorityLevel.Completed(PriorityBindingEntry entry)
   w Perspex.PriorityBindingEntry.<>c__DisplayClass17_0.<Start>b__1()
Steven Kirk
@grokys
Dec 17 2015 22:22 UTC
what does the exception say?
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:22 UTC
is thrown when
<ContentControl Content="{Binding Path=Project.CurrentContainer.CurrentShape, Mode=TwoWay}"/>
the Content is changed
the value CurrentShape is set to new value
Steven Kirk
@grokys
Dec 17 2015 22:23 UTC
hmm, i wonder what is causing the Template to change when Content changes?
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:23 UTC
different DataTemplate is used
Steven Kirk
@grokys
Dec 17 2015 22:23 UTC
that shouldn't change the Template
@danwalmsley sure - non-templated controls can contain other controls
Panel for example
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:24 UTC
I use this DataTemplates
        <DataTemplate DataType="core:XRectangle">
            <shapes:RectangleControl/>
        </DataTemplate>
        <DataTemplate DataType="core:XEllipse">
            <shapes:EllipseControl/>
        </DataTemplate>
Steven Kirk
@grokys
Dec 17 2015 22:24 UTC
Decorator
Border
@wieslawsoltes i need to get Core2D building...
danwalmsley
@danwalmsley
Dec 17 2015 22:25 UTC
@grokys thanks will have a look at how Panel does that
Steven Kirk
@grokys
Dec 17 2015 22:25 UTC
you should probably just inherit from one of the classes that already does what you want
Panel can be used to overlay multiple controls
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:26 UTC
hm this works:
        <DataTemplate DataType="core:XRectangle">
            <!--<shapes:RectangleControl/>-->
            <TextBlock Text="Rectangle"/>
        </DataTemplate>
        <DataTemplate DataType="core:XEllipse">
            <!--<shapes:EllipseControl/>-->
            <TextBlock Text="Ellipse"/>
        </DataTemplate>
danwalmsley
@danwalmsley
Dec 17 2015 22:26 UTC
ah.. so my textview can inherit from StackPanel... add in the margins then itself?
perhaps thats a bit messy though
IScrollInfo is working :D
Steven Kirk
@grokys
Dec 17 2015 22:28 UTC
depends... i'd inherit from Panel, draw the text in Panel.Render and add the overlays as children
danwalmsley
@danwalmsley
Dec 17 2015 22:29 UTC
then to get the margins,, shifting the text and overlays across a little?
thats why I was thinking stackpanel
margin is normally on left side
like breakpoints and line numbers
Steven Kirk
@grokys
Dec 17 2015 22:30 UTC
StackPanel doesn't lend itself well to fitting children
danwalmsley
@danwalmsley
Dec 17 2015 22:32 UTC
ok
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:33 UTC
@grokys I have isolated this issue
        <DataTemplate DataType="core:XRectangle">
            <!--<shapes:RectangleControl/>-->
            <TabControl/>
        </DataTemplate>
Steven Kirk
@grokys
Dec 17 2015 22:33 UTC
@wieslawsoltes Core2D still not building, getting:
Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0246    The type or namespace name 'ImageDefinition' could not be found (are you missing a using directive or an assembly reference?)    Renderer.Dxf    D:\projects\Core2D\Dependencies\Renderer.Dxf\DxfRenderer.cs    21    Active
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:34 UTC
Did you do git submodule update --init
danwalmsley
@danwalmsley
Dec 17 2015 22:35 UTC
@grokys thanks for IScrollInfo.. it will take me a while to update editor to work correctly with it,,, but its already making a massive difference to rendering speed
Steven Kirk
@grokys
Dec 17 2015 22:35 UTC
ah, thought i had, but obviously forgot
Darnell Williams
@Seeker1437
Dec 17 2015 22:36 UTC
:D
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:37 UTC
Ok so when I use TabControl in DataTemplate I get the above exception
danwalmsley
@danwalmsley
Dec 17 2015 22:41 UTC
ok im calling it a night, thanks for help
see you all tomorrow! :D
Darnell Williams
@Seeker1437
Dec 17 2015 22:41 UTC
@danwalmsley cya XD
Wiesław Šoltés
@wieslawsoltes
Dec 17 2015 22:46 UTC
@grokys I was able to reproduce the issue in Perspex Xaml test app
go to EXCEPTION_TEST tab and try selected items in ListBox
Steven Kirk
@grokys
Dec 17 2015 23:09 UTC
oh great, thanks!
Steven Kirk
@grokys
Dec 17 2015 23:24 UTC
ok, i understand
problem was a simple one: because TabControl is an ItemsControl but doesn't actually create item containers, its ItemContainerGenerator is null
i forgot to account for that in one place
i was worried that TabControls template was being cleared, but that's correct as it's being removed from the logical tree
should be fixed in next nightly
next have to work out a way to style tabs in TabControl
Steven Kirk
@grokys
Dec 17 2015 23:30 UTC
i think i need to find a way to remove the need for TabStripItem - i'm not happy with it
Darnell Williams
@Seeker1437
Dec 17 2015 23:41 UTC
I think it should stay XD
hehe I have been working heavily on docking whose system does make use of that object
though I guess it really doesn't matter... hmmm