These are chat archives for AvaloniaUI/Avalonia

12th
Dec 2015
danwalmsley
@danwalmsley
Dec 12 2015 00:10
@kekekeks the designer still blocks compiling quite often for me and I endup with lots of Perspex.Designer processes running
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:11
Even compiling?
weird
Does it happen with multiple instances of VS or you are using single one?
danwalmsley
@danwalmsley
Dec 12 2015 00:11
well building
its stops it being able to replce the exe file
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:11
Hm
danwalmsley
@danwalmsley
Dec 12 2015 00:12
maybe there was an update I missed?
Apply this and copy console output when you hit "Build"
danwalmsley
@danwalmsley
Dec 12 2015 00:13
it doesnt happen every time... its intermittent
but fairly regular
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:14
Well, I still need some logs from cases when it happens
danwalmsley
@danwalmsley
Dec 12 2015 00:17
just trying to get it to do it again now
its been happening all day
on different machines..
will send shortly.. if I can get it to do it...
might be when I have multiple designers open..
will try that
do I need to restart VS after applying? for it to work?
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:18
yep
BTW, do you still have Perspex.Designer processes after VS is closed?
danwalmsley
@danwalmsley
Dec 12 2015 00:20
no
cant reproduce... will keep working
it will prob happen soon
btw im trying to implement dragging for my custom window...
how do I set the window position?
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:24
You don't :P
For now just use BeginMoveDrag
I'm planning to refactor our windowing system a bit
so there won't be separate IPopupImpl/IWindowImpl
danwalmsley
@danwalmsley
Dec 12 2015 00:25
that is awesome and so simple...
how can I limit its effects to just the titlebar area?
prob hittest the grid that is representing that area
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:27
Just handle mouse down on window title
danwalmsley
@danwalmsley
Dec 12 2015 00:28
I guess I need to get the titlebar first...
this is in my MetroWindow class
which is derived from Window...
blob
ooops included my brother in there
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:30
Awesome
danwalmsley
@danwalmsley
Dec 12 2015 00:30
but basically the titlebar is just a grid
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:30
We need some separate repo for such stuff
Since main one is already huge
danwalmsley
@danwalmsley
Dec 12 2015 00:30
yeh
at the moment a metro window needs a lot of the resource stuff to work correctly I think
to do it properly
not sure how to make the drag only work for titlebar
namespace AvalonStudio.Controls
{
    using Perspex.Controls;
    using Perspex.Styling;
    using System;
    using Perspex.Input;

    public class MetroWindow : Window, IStyleable
    {
        public MetroWindow()
        {
        }

        Type IStyleable.StyleKey => typeof(MetroWindow);

        protected override void OnPointerPressed(PointerPressEventArgs e)
        {
            BeginMoveDrag();
            base.OnPointerPressed(e);
        }

        protected override void OnTemplateApplied(INameScope nameScope)
        {
            base.OnTemplateApplied(nameScope);
        }
    }
}
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:32
Well, icons can be stored as geometry even without clip
danwalmsley
@danwalmsley
Dec 12 2015 00:32
yeh... I can remove clip anyway
would be nice to have OpacityMask though
then I dont have to worry about colour
danwalmsley
@danwalmsley
Dec 12 2015 00:43
namespace AvalonStudio.Controls
{
    using Perspex.Controls;
    using Perspex.Styling;
    using System;
    using Perspex.Input;

    public class MetroWindow : Window, IStyleable
    {
        public MetroWindow()
        {
        }

        Type IStyleable.StyleKey => typeof(MetroWindow);

        private Grid titleBar;

        protected override void OnPointerPressed(PointerPressEventArgs e)
        {
            if(titleBar.IsPointerOver)
            {
                BeginMoveDrag();
            }

            base.OnPointerPressed(e);
        }

        protected override void OnTemplateApplied(INameScope nameScope)
        {
            titleBar = nameScope.Find<Grid>("titlebar");
            base.OnTemplateApplied(nameScope);
        }
    }
}
this works..
now for resize
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:43
Resize will be tricky one
Well, we can implement BeginResizeDrag too
danwalmsley
@danwalmsley
Dec 12 2015 00:44
i saw the method
is it not implemented?
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:44
Ehm, where?
danwalmsley
@danwalmsley
Dec 12 2015 00:44
oh BeginAutoSizing
what does that do?
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:45
No idea, but definetely has nothing to do with window resize grips
I'm talking about this
danwalmsley
@danwalmsley
Dec 12 2015 00:49
Cursor="Hand"
cant get it to work
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Name="WindowBorder" Cursor="Hand">
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:49
I'm afraid there is no type converter for that
danwalmsley
@danwalmsley
Dec 12 2015 00:49
basically trying to get the mouse to change at window edge...
ah ok
danwalmsley
@danwalmsley
Dec 12 2015 00:56
bug just happened
wheres the log file?
KillAllDesigners
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Restarting designer
KillAllDesigners
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Restarting designer
KillAllDesigners
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Restarting designer
KillAllDesigners
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer

KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Killing Perspex.Designer
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
Kill
Nikita Tsukanov
@kekekeks
Dec 12 2015 00:58
@danwalmsley I need only new lines
Lines that get added after you hit "Build" and it doesn't work
full log is kinda useless
danwalmsley
@danwalmsley
Dec 12 2015 00:58
sorry
it should just be the end then I guess
i didnt do anything after the bug happened
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:00

sorry

You are constantly apologising for stuff you shouldn't be. Are you from Canada? :)

i didnt do anything after the bug happened

Log got cut or something

Please, copy last 15 lines
danwalmsley
@danwalmsley
Dec 12 2015 01:04
hahaha... sorry :D
ok will try and get it again
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:04
just copy last lines
danwalmsley
@danwalmsley
Dec 12 2015 01:06
I lost it
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:10
Perspex/Perspex@53b9092
danwalmsley
@danwalmsley
Dec 12 2015 01:11
@kekekeks thanks
hey do you know how I can programatically maximize a window
protected override void OnTemplateApplied(INameScope nameScope)
        {
            titleBar = nameScope.Find<Grid>("titlebar");
            windowBorder = nameScope.Find<Border>("windowBorder");
            restoreButton = nameScope.Find<Button>("restoreButton");

            restoreButton.Click += (sender, e) =>
            {
                this.   ???
            };

            windowBorder.Cursor = new Cursor(StandardCursorType.SizeAll);
            base.OnTemplateApplied(nameScope);
        }
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:12
You can't
We don't have support for that yet
And for minimize
I hope to get some time this weekend to work on windowing stuff
danwalmsley
@danwalmsley
Dec 12 2015 01:13
ah ok..
I will add another issue...
@kekekeks did any decision come about how to get IScrollInfo working?
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:16
Well, we need to implement support for it in ScrollViewer
Most of controls were written by @grokys or ported from moonlight, and I have almost no knowledge of internals, so I'm currently working on low-level stuff like rendering, windowing, designer support, etc
danwalmsley
@danwalmsley
Dec 12 2015 01:27
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Mode: vsIDEModeDebug
KillAllDesigners
Mode: vsIDEModeDesign
KillAllDesigners
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
KillAllDesigners
Killing Perspex.Designer
Killing Perspex.Designer
BuildEnd: vsBuildScopeProject/vsBuildActionBuild
Designer restart requested, waiting
Designer restart requested, waiting
Restarting designer
Restarting designer
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:29
Hm
And that gives you build error?
How many designer processes are currently running?
danwalmsley
@danwalmsley
Dec 12 2015 01:31
3
it just give me unable to copy file ... error
Darnell Williams
@Seeker1437
Dec 12 2015 01:32
Because we probably arent handling when a designer window is hidden
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:32
Please run process explorer and check parent process for these Perspex.Designer instances
danwalmsley
@danwalmsley
Dec 12 2015 01:32
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): warning MSB3026: Could not cop
2>y "obj\Debug\AvalonStudio.exe" to "bin\Debug\AvalonStudio.exe". Beginning retry 9 in 1000ms. The requested operation ca
2>nnot be performed on a file with a user-mapped section open.\r
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): warning MSB3026: 
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): warning MSB3026: Could not cop
2>y "obj\Debug\AvalonStudio.exe" to "bin\Debug\AvalonStudio.exe". Beginning retry 10 in 1000ms. The requested operation c
2>annot be performed on a file with a user-mapped section open.\r
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): warning MSB3026: 
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): error MSB3027: Could not copy 
2>"obj\Debug\AvalonStudio.exe" to "bin\Debug\AvalonStudio.exe". Exceeded retry count of 10. Failed.
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): error MSB3021: Unable to copy 
2>file "obj\Debug\AvalonStudio.exe" to "bin\Debug\AvalonStudio.exe". The requested operation cannot be performed on a fil
2>e with a user-mapped section open.\r
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): error MSB3021: 
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:32
@ImaBrokeDude KillAllDesigners doesn't see one of designer processes for some reason
And that's the cause of our issue
Darnell Williams
@Seeker1437
Dec 12 2015 01:33
hmmmm weird
danwalmsley
@danwalmsley
Dec 12 2015 01:33
how do you see the parent process?
You need this utility
danwalmsley
@danwalmsley
Dec 12 2015 01:35
ok
then how to see parent?
was 3 open
now 1 closed
for no reason
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:36
Argh
And I guess now everything works fine
danwalmsley
@danwalmsley
Dec 12 2015 01:36
blob
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:36
View -> Show Process Tree
danwalmsley
@danwalmsley
Dec 12 2015 01:36
ok
they are under devenv
yes works fine
normally I get the error
then try again a couple of times
and it starts to work again
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:37
We need to figure out why this process stays alive
Darnell Williams
@Seeker1437
Dec 12 2015 01:38
im checking somethijg now
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:38
@danwalmsley Perspex/Perspex@ec2a319
Darnell Williams
@Seeker1437
Dec 12 2015 01:40
There has to be a better way to find all the Perspex.Designer processes
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:40
The point is that we only need ones that belong to current VS instance
Darnell Williams
@Seeker1437
Dec 12 2015 01:40
Even if trying to ensure its only the ine VS is running
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:42
Got to mark them with MainWindowTitle or something
It seems that WMI is unreliable
Darnell Williams
@Seeker1437
Dec 12 2015 01:43
Hmm but you did it right wow
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:44
Well, I'll try to use toolhelp32 instead of WMI first
@grokys We need to simplify converter stuff
Our converters have 3 methods that effectively do nothing and contain copy-pasted code
Darnell Williams
@Seeker1437
Dec 12 2015 01:48
@kekekeks
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:51
wut
Darnell Williams
@Seeker1437
Dec 12 2015 01:51
wait nvm
toolhelp32 zi am unfamiliar with
danwalmsley
@danwalmsley
Dec 12 2015 01:52
@kekekeks resize is implemented now?
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:52
Yep
Call BeginResizeDrag a from PointerPressed
danwalmsley
@danwalmsley
Dec 12 2015 01:54
@kekekeks will that resize in any direction?
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:54
You need to pass proper WindowEdge value
danwalmsley
@danwalmsley
Dec 12 2015 01:54
ok
Darnell Williams
@Seeker1437
Dec 12 2015 01:55
Idk how that would help though
danwalmsley
@danwalmsley
Dec 12 2015 01:55
blob
just workin out how to detect the edge as you can see from screenshot
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:55
@ImaBrokeDude The problem is that WMI doesn't see that third Perspex.Designer process
Darnell Williams
@Seeker1437
Dec 12 2015 01:55
what if one kf the designer processes does in fact have the same pid?
Nikita Tsukanov
@kekekeks
Dec 12 2015 01:56
wat
Dude, PID is unique by definition
Darnell Williams
@Seeker1437
Dec 12 2015 01:56
Im tripping
tired today
I wonder...
VS is so annoying
danwalmsley
@danwalmsley
Dec 12 2015 02:16
we dont have cursors for north west, south east, etc
diagnal resize ones?
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:29
GTK don't have them out of the box, unfortunately
And it requires some magic to get one from system theme
danwalmsley
@danwalmsley
Dec 12 2015 02:30
 <Border BorderThickness="4" BorderBrush="Green" Margin="-4">
          <Grid ColumnDefinitions="Auto, *, Auto" RowDefinitions="Auto,Auto,*,Auto,Auto">
            <Grid Background="Transparent" Width="4" Height="10" Name="topLeftGrip" Cursor="SizeAll" />
            <Grid Background="Transparent" Width="4" Grid.Row="1" Grid.RowSpan="2" Cursor="SizeWestEast" Name="leftVerticalGrip" />
            <Grid Background="Transparent" Width="4" Height="10" Grid.Row="4" Name="bottomLeftGrip" Cursor="SizeAll" />
I expected the Background = transparent
to allow you to see the Green border
since margin = -4
but...
blob
black border...
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:33
What did you expect to see there?
danwalmsley
@danwalmsley
Dec 12 2015 02:33
black border should be green
<Border BorderThickness="4" BorderBrush="Green" Margin="-4">
          <Grid ColumnDefinitions="Auto, *, Auto" RowDefinitions="Auto,Auto,*,Auto,Auto" Background="Transparent">
            <Grid Background="Transparent" Width="4" Height="10" Name="topLeftGrip" Cursor="SizeAll" />
            <Grid Background="Transparent" Width="4" Grid.Row="1" Grid.RowSpan="2" Cursor="SizeWestEast" Name="leftVerticalGrip" />
            <Grid Background="Transparent" Width="4" Height="10" Grid.Row="4" Name="bottomLeftGrip" Cursor="SizeAll" />

            <Grid Background="Transparent" Width="4" Height="10" Grid.Column="2" Name="topRightGrip" Cursor="SizeAll" />
            <Grid Background="Transparent" Width="4" Grid.Row="1" Grid.RowSpan="2" Grid.Column="2" Cursor="SizeWestEast" Name="rightVerticalGrip" />
            <Grid Background="Transparent" Width="4" Height="10" Grid.Row="4" Grid.Column="2" Name="bottomRightGrip" Cursor="SizeAll" />

            <Grid Grid.Row="0" Grid.RowSpan="5" Grid.Column="1" RowDefinitions="Auto * Auto" ColumnDefinitions="Auto,Auto,*,Auto,Auto">
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:34
Yep, it's green, but OUTSIDE the window surface
danwalmsley
@danwalmsley
Dec 12 2015 02:34
haha ok... hmm
perhaps a different strategy is needed
im trying to create an invisible "Resize Grip" around the edge of the window...
the border needs to be visible underneath
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:35
Well, you have your border, right?
danwalmsley
@danwalmsley
Dec 12 2015 02:35
yes..
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:35
Just get events from it and handle cursor from codebehind
danwalmsley
@danwalmsley
Dec 12 2015 02:35
but no way to tell which edge the border is on...
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:35
That's actually very simple task
danwalmsley
@danwalmsley
Dec 12 2015 02:35
ok yep.. code behind
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:36
You only need pointer coordinates for that
danwalmsley
@danwalmsley
Dec 12 2015 02:36
and do some math on the co-ordinates
damn...
hmm but it does mean if the boarder is 0 thickness it wont work
ok but I can use window coordinates...
ok but no way to have cursor change...
?
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:37
Well, window is supposed to have some border unless it's maximized
And with maximized window you don't need size grip
Basically you need to handle events for that border and set cursor for it
You also need some wrapped border that has default cursor
danwalmsley
@danwalmsley
Dec 12 2015 02:38
ah fixed the original
<Border BorderThickness="4" BorderBrush="Green">
          <Grid Margin="-4" ColumnDefinitions="Auto, *, Auto" RowDefinitions="Auto,Auto,*,Auto,Auto" Background="Transparent">
margin -4 was on the border before...
that works nicely.. probably stick with that for now
blob
with a template binding there was a way to negate its value I think
can you remember
Nikita Tsukanov
@kekekeks
Dec 12 2015 02:40
I'm not an expert in that area
Steven Kirk
@grokys
Dec 12 2015 09:51
We need to simplify converter stuff
which converter stuff?
IValueConverter only has 2 methods
I guess you mean the XAML ITypeConverter? that comes from OmniXAML
but when .net standard platform is ready, we can just use the BCL ones
Steven Kirk
@grokys
Dec 12 2015 10:08
@danwalmsley negate a binding? use !
Nikita Tsukanov
@kekekeks
Dec 12 2015 10:59

but when .net standard platform is ready, we can just use the BCL ones

And they will still have 3 useless methods

I think we need IMarkupConverter
With object Convert(string value) method
And some attribute for registration
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:13
@grokys Perspex/Perspex#357 any idea why this can be happening?
Steven Kirk
@grokys
Dec 12 2015 11:16
those methods are only useless because they're not implemented yet. they should be implemented, e.g. if we want to be able to extract control templates for editing
re: #357, no idea - it works correctly at runtime it seems
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:17

if we want to be able to extract control templates for editing

Ehm?

Steven Kirk
@grokys
Dec 12 2015 11:19
this is for blend but it works the same in VS: https://msdn.microsoft.com/en-us/library/jj170032.aspx
under "Create a template or style"
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:19
So you want a visual editor for values
Steven Kirk
@grokys
Dec 12 2015 11:20
no, have you never used to VS/blend designer to change a control template?
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:20
Nope, I only use text editor
Steven Kirk
@grokys
Dec 12 2015 11:21
ok, well it extracts the xaml tree from the control template, which involves serializing from an object tree to XAML
i.e. converting the other way
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:21
oh
Steven Kirk
@grokys
Dec 12 2015 11:21
for which we'll need the type converters to do that
which is what the other methods are for
however, when we have access to the BCL TypeConverter (soon, I hope) there are default impls for those methods anyway
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:22
Well, how TypeConverter is supposed to serialize LinearGradientBrush?
Steven Kirk
@grokys
Dec 12 2015 11:24
it doesn't - there is no LinearGradientBrushConverter because there's no string representation of a LinearGradientBrush
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:26
Mkay, I'll try to wrap my head around this stuff when we'll be implementing it
Steven Kirk
@grokys
Dec 12 2015 11:27
(gotta love this:)
            if (t == typeof(string))
            {
                return true;
            }
            else
            {
                return false;
            }
Nikita Tsukanov
@kekekeks
Dec 12 2015 11:32
"Let's have our new junior dev to write ColorConverter, it's simple, what can possibly go wrong?"
danwalmsley
@danwalmsley
Dec 12 2015 12:47
@grokys / @kekekeks I have a list box... when I change the selectedItem i need it to automatically scroll that item into view... is there an easy way to do this?
to do that you first need to get the container of the item from the ItemsControl
danwalmsley
@danwalmsley
Dec 12 2015 12:49
what about from viewmodel?
Steven Kirk
@grokys
Dec 12 2015 12:49
which you can do via. ItemsControl.ItemContainerGenerator.ContainerFromIndex
danwalmsley
@danwalmsley
Dec 12 2015 12:49
or do I need to create a custom ListBox?
Steven Kirk
@grokys
Dec 12 2015 12:49
hmm, from viewmodel
danwalmsley
@danwalmsley
Dec 12 2015 12:49
I was hoping there might be a Property I could set in Xaml
like AutoScrollToSelectedIndex = true
Steven Kirk
@grokys
Dec 12 2015 12:50
there's not currently, but that would be a good idea
danwalmsley
@danwalmsley
Dec 12 2015 12:50
I know in WPF I had to implement some behaviours... it git messy
Steven Kirk
@grokys
Dec 12 2015 12:50
yeah, it should be default functionality
danwalmsley
@danwalmsley
Dec 12 2015 12:51
If I inherit from ListView... can is there a method that can be easily overriden?
Steven Kirk
@grokys
Dec 12 2015 12:51
could you add an issue and i'll implement after i've finished what i'm currently doing
i don't think inheriting from ListView would gain you anything
danwalmsley
@danwalmsley
Dec 12 2015 12:52
awesome... features on demand
ok
Steven Kirk
@grokys
Dec 12 2015 12:52
:)
danwalmsley
@danwalmsley
Dec 12 2015 12:53
#363
hey after that if you were really struggling for something todo... maybe IScrollInfo could be a good suggestion...? im just being cheeky now!
Steven Kirk
@grokys
Dec 12 2015 12:54
haha no, you're right, it needs doing
danwalmsley
@danwalmsley
Dec 12 2015 12:54
im crying out for it!!!
with that implemented it will be a big step forward for me
danwalmsley
@danwalmsley
Dec 12 2015 13:30
@grokys im having a performance issue when setting a List for ListBox items... very slow at the moment...
Steven Kirk
@grokys
Dec 12 2015 13:31
"when setting a List for ListBox items" - what do you mean?
danwalmsley
@danwalmsley
Dec 12 2015 13:31
do you have a second to clone my project, and try it out?
basically I set a list (quite long)
Bound to ListBoxITems
it takes like 250ms for the set to happen
Darnell Williams
@Seeker1437
Dec 12 2015 13:33
In wpf doesnt Items just return an ItemsCollection by default?
oh sorry random question sorry about that xD
danwalmsley
@danwalmsley
Dec 12 2015 13:34
Workspace.This.Console.WriteLine("Setting Completion List");
                  sw.Reset();
                    sw.Start();
                    Model = unfilteredCompletions;
                    IsVisible = true;
                    sw.Stop();
                    Workspace.This.Console.WriteLine(sw.ElapsedMilliseconds.ToString());
the Model=unfilteredCompletions take like 250ms
and Model is type List<ViewModel>
ListBox.Items is bound to Model
Steven Kirk
@grokys
Dec 12 2015 13:35
it's probably because we don't virtualize listbox items
danwalmsley
@danwalmsley
Dec 12 2015 13:36
i bet thats a lot of work to implement?
Steven Kirk
@grokys
Dec 12 2015 13:36
yep!
@ImaBrokeDude yes it does, but WPF has both ItemsSource and Items and they interact in strange ways
i wanted to avoid that by just having a single Items property
Darnell Williams
@Seeker1437
Dec 12 2015 13:41
gottcha
danwalmsley
@danwalmsley
Dec 12 2015 13:47
yeh it must be that
if I limit the lists to 25 items
its responsive again..
does wpf virtualize by default?
Steven Kirk
@grokys
Dec 12 2015 14:02
yeah
it's the main "big feature" we're missing, but there needs to be a few other things in place before we start on it
danwalmsley
@danwalmsley
Dec 12 2015 14:04
@grokys ok cool... limiting my results to 50 or so is a good enough work around for now
will need it eventually though
I had to implement virtualization on some of my controls in the WPF version of my app
and it was not easy to get right... data virtualization that is
Darnell Williams
@Seeker1437
Dec 12 2015 14:34
Hye guys can i get a quick opinion?
if you could name this control, what would you call it?
pie
not sure why preview is borken but eh
mainly wiht the hide & unhide effects XD
Darnell Williams
@Seeker1437
Dec 12 2015 14:42
WHen I did it, the idea was to copy like how the ipad one the ipad you could slide an item over to reveal extra options
Darnell Williams
@Seeker1437
Dec 12 2015 15:07
ha that means I reinvented the wheel :(
danwalmsley
@danwalmsley
Dec 12 2015 16:09
@grokys how do I set SelectedItems background?
Darnell Williams
@Seeker1437
Dec 12 2015 16:41
@grokys I think I lost the first instance, be is that a way to traverse the visual tree using a PerspexObject
Steven Kirk
@grokys
Dec 12 2015 17:29
Not sure what you mean but there are extension methods in Perspex.VisualTree
Darnell Williams
@Seeker1437
Dec 12 2015 17:32
Right but those expect IVisual
I only have a PerspexObject
Ah I guess I could just cast
danwalmsley
@danwalmsley
Dec 12 2015 20:59
@kekekeks after leaving my app for several hours I got OutOfMemoryException.... in SharpDX.dll.... perhaps this might be a clue on where memory leak lies?
Nikita Tsukanov
@kekekeks
Dec 12 2015 22:02
Yep, in Direct2D backend
Nikita Tsukanov
@kekekeks
Dec 12 2015 22:09
@danwalmsley regarding diagonal cursors
GTK has cursors for each corner
And for each side
We probalby should create equalents and just map them to resize cursors on windows platform
that way you'll be able to get native look&feel for all platforms
Nikita Tsukanov
@kekekeks
Dec 12 2015 22:19
@danwalmsley Perspex/Perspex@f85d68d
Darnell Williams
@Seeker1437
Dec 12 2015 23:05
Can we do Readonly, Attached, and ReadonlyAttached PerspexPropertys?
Not that I need it right away just..... curious
danwalmsley
@danwalmsley
Dec 12 2015 23:26
@kekekeks @grokys since implementing my own windows F12 dev tools doesnt seem to work
do I need to listen out for F12 myself now?
Nikita Tsukanov
@kekekeks
Dec 12 2015 23:30
no idea
Darnell Williams
@Seeker1437
Dec 12 2015 23:52
@kekekeks do you think you can look at the PerspexVS PR or make any changes? I still can't build extensions XD
danwalmsley
@danwalmsley
Dec 12 2015 23:58
@kekekeks thanks for corner arrows,, tested and works perfectly.