« first day (864 days earlier)      last day (3285 days later) » 
00:00 - 22:0022:00 - 00:00

12:00 AM
@JohanLarsson
the bottom quadrant of the gauge seems to be getting cut off
 
not sure why that happens
remember that the gauge can be very broken
also, ar you sure you want that MajorTickFrequency?
I think you want 10
 
okay updated, I had to set a small margin though so the bottom quadrant of the gauge would show
 
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
You don't want that in that gird
and pretty sue you don't want that margin
 
okay but when I remove,that code above the gauge moves to the center of the screen
 
yes
you want:
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
on your toplevel grid
then place the grid with the gauges in col1
and the rest in a nested grid in col 0
 
12:16 AM
okay let me get my head around that
so first remove :
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
then
leave on top level, this
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
then what?
what do you mean by the rest in a nested grid?
 
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
move ^ to row 13
then wrap row 15 - 22 in a gird (nested)
your gauges are in a nested grid
I use nested for meaning one level down
English is not my language
 
okay cool, I'll try that out
btw is the AngularBlockBar supposed to act the same way as the gauge? Because although the value is being bound to it, it still doesn't show any value..I moved it to row 2 to check this but no luck
so like this:
problem I have then is layout looks like this...
 
12:34 AM
beautiful
now you need to adjust margins
goal should be to remove them altogether
 
set <Grid Grid.Colum = "1"> on the grid with the gauges
 
okay
 
row 31
 
didn't change the positioning of the gauges though
 
12:37 AM
t is wrong
does it even compile?
remove row 31
 
missing the closing tag
hmmm
ahhh thats more like it :)
it was a second spurious grid that was causing that
okay so thats that
Now to diagnose why this block bar isn't showing it binding, any ideas?
 
1:01 AM
no idea
 
 
14 hours later…
3:24 PM
mornin
 
3:35 PM
hi
@JohanLarsson @NETscape so I've placed an AngularBlockBar directly on top of the AngularGauge in my layout. For testing purposes I set the binding of both to the controls to DegreeStatus and set the fill of the block bar to blue. But when I run the application only the AngularGauge's value is being updated, the AngularBlockBar isn't visible at all. Any ideas as to why this could be?
 
It doesn't look like they are exactly over one another, they don't have the same layout properties
Height="Auto" Margin="0,0,-60,67" Grid.RowSpan="2" Width="Auto"
 
3:50 PM
okay didn't spot that margin
even so, the Angular block isn't visible at all on screen, no binding shows.
 
also have different angles
opacity of 0.2 might be why also
set it to 1, then play around with xaml until you have it working, then make it less visible i guess
 
ok cool, didn't spot all them differences, must have made them last night.
 
4:20 PM
so making it less opaque to '1' and matching the angle settings on both didn't make the bar visible.
I'm thinking it would be easier to use two gauges on top of each other, I'll have to wait until @JohanLarsson is online to ask about the library specifics
 
The library is broken
Gonna add stuff like ranges if I manage to unbreak it
 
cool that would be a relief, I'm still having bother getting this block bar to show on screen
@JohanLarsson could I use two gauges on top of each other instead of using a block bar? I tried this but don't know how to set the fill colour as its not an available. Anyways I'll be back on in an hour or so
 
4:59 PM
Good morning all
 
heyooo
 
5:21 PM
How are you @NETscape
 
good good. trying to "optimize" how are you @BradleyDotNET? things going good?
 
alright, still getting over my cold
 
yuck
going on a week now
 
Yeah
Thankfully it seems to be almost over
 
how do you cancel an await call?
 
5:35 PM
I'm not sure you can...
 
i dunno its not really "cancelling an await"
more like aborting the thread you launched
and you ahve to build cancellation checks yourself into your long running process
 
5:51 PM
morning @BradleyDotNET
 
<ControlTemplate.Triggers>
    <DataTrigger Binding="{Binding Axis.Placement, RelativeSource={RelativeSource AncestorType={x:Type local:LinearGauge}}}" Value="Top">
        <Setter TargetName="Axis" Property="DockPanel.Dock" Value="Top" />
Is ^ possible
I want to bind a trigger to the value of a nested property
 
Assuming Axis is on that source, yeah, that should work
of course, the INPC there might get tricky
 
they are dps
Reed is back!
I could use a converter but always try to avoid them
 
@JohanLarsson this block bar doesn't seem to be working out for me. I was thinking over putting another gauge on top of the first one and changing the fill value, but there is noavailable property on the guage.
 
you set it with the template
 
6:01 PM
okay, thanks and for the actual arc value, I was thinking if I could store all the values between the start and end of the arc in an array, then bind to that.
 
Hi @Johan ;)
 
good idea or no?
 
@ReedCopsey If you are bored I have a HUGE mess :)
@BrianJ not sure what you mean
 
lol - I'm so underwater at the moment ;)
 
@JohanLarsson its okay I'll try to figure it out a bit better, then ask on here
 
6:05 PM
@NETscape You need to design it to be cancellable, and pass a CancellationToken, etc
there's no forced cancellation in .NET -it's all cooperative cancellation
 
last does not even compile
 
@Johan You need "(DockPanel.Dock)" and similar
when you're using attached props as a target, they need to be in paren
 
ah ty ty that might be it
 
see the last section ;)
I believe that's true for trigger targets, too
 
I set it like: <Setter TargetName="Line" Property="DockPanel.Dock" Value="Right" />
in other places and it works
 
6:22 PM
@ReedCopsey any advice on how to debug RaisePropertyChanged? I've set a break point on it, but it doesn't get fired. Everything else "seems" to be wired up correctly. Also set a breakpoint on the `_painfulArcOutput`in the model that is tied to the `PainfulArcStatus` property and that shows as being populated, so must be something going on in between the Model and VM..

https://gist.github.com/BrianJVarley/62a026f214e1736ad098


https://gist.github.com/BrianJVarley/ea3d7f38ed8bc37913d7
 
as far as I see in that code, _painfulArcOutput isn't a property or inside of a property anywhere
so I don't know where or why you'd expect it to raise property changed notifications
 
6:37 PM
<DataTrigger Binding="{Binding Axis.Placement, RelativeSource={RelativeSource Self}}" Value="Top">
    <Setter TargetName="Axis" Property="DockPanel.Dock" Value="Top" />
    <Setter TargetName="Indicators" Property="DockPanel.Dock" Value="Bottom" />
    <Setter TargetName="Indicators" Property="VerticalAlignment" Value="Top" />
</DataTrigger>
RelativeSource Self worked
also works without (DockPanel.Dock)
 
ahh, okay
 
no idea why
 
okay I think I see the problem now, the handler wasn't set up correctly
this is working now, handler wasn't set up for the _painfulArcOutput
_painfulArcOutput
obviously my calculation for the arc range isn't correct though..
it outputting from the 0 to the end of the arc, should be from start arc to end arc.
in this instance it should be showing an arc on the gauge from, 107.11 --> 116.96
@JohanLarsson does the gauge reading have to start from zero?
Is it possible for example to set it from 70 --> 90
or always has to start at zero
?
 
6:59 PM
as it is now it starts from zero
it is wip
 
7:12 PM
ok cool, one last question, instead of using margins to increase size of the gauge, could I just use the height property or is this bad practice? @JohanLarsson
 
you can use height or size the cell it is in depending on what is nicer
height is not bad practice per se
 
I usually use margin only for positioning
and really I use translate transform even more often
most of the time, I avoid margin
 
(Y)
@BradleyDotNET I'm presenting my project to a physiotherapist this week
its came a long way since a month back
still not perfect but getting there
 
7:32 PM
    public static class NameOf
    {
        public static string Property(Expression<Func<object>> property)
        {
            var pathVisitor = new PathVisitor();
            pathVisitor.Visit(property);
            return string.Join(".", pathVisitor.Properties.Select(x => x.Name));
        }

        internal class PathVisitor : ExpressionVisitor
        {
            internal readonly List<PropertyInfo> Properties = new List<PropertyInfo>();

            protected override Expression VisitMember(MemberExpression node)
:)
 
margins are really bad. they make any redesign you want to do super painful
i'd avoid them if you can help it
 
margins should be used to create margins
 
lol. well put
 
Layout is an area where wpf shines imo.
So who wants to hunt down a bug?
 
agreed
 
7:49 PM
var property = NameOf.Property(() => this.Gauge.Axis.Placement);
var placementBinding = new Binding(property)
{
    Source = this,
    Mode = BindingMode.OneWay
};
BindingOperations.SetBinding(this, PlacementProperty, placementBinding);
^ a piece of beauty
Does this api make sense?
 
Looks reasonable on first glance
 
I have a strange bug
ha found it
 
8:14 PM
@ReedCopsey hey, welcome back! ;) Question for ya. I have an IDL file which has a function that takes parameter of type (SAFEARRAY)short* ... anyway I can change that safely so I get something like out short[][]?
 
mmm - not sure
 
I have learned to hate Array :)
because type safety
 
@JohanLarsson is it okay to use margin if I need the gauge to align to the right of the user control? I've specified row"0", collumn"1" but theres still a big gap between the edge if the gauge and the right of the user control
 
use HorzontalAlignment="Right"
 
gotcha
 
8:22 PM
might not work with the gauge depending on how broken it it
 
are you currently working on adding a range property to your gauge library?
 
but as a general rule HorzontalAlignment="Right" is what you want for that
I've been trying to unbreak things for a while
Added linear ranges but they were easy
 
the HorzontalAlignment is not recognized or is not accessible
better use margin for now
 
maybe I spelled it wrong
 
oh you did
sorry
 
8:24 PM
Better stop using margings now imo :)
 
so that made the gap even bigger
 
Not using margins for positioning is first class advice
ha
 
yes, if you're using grids, use the grid built-in layout
that'll allow the gauge to grow/shrink vertically and horizontally if you design it properly
 
@BrianJ It can be a broken in the gauge
 
I'm still learning :)
 
8:26 PM
What does your xaml look like?
Clean it for margins before you post
 
There is no HorzontalAlignment="Right" on the gauge man
 
I removed it because it didn't work, let me re post
 
You should play some with the rectangles
From your screenie it appears that the bound of the gauge are much larger than what is drawn
You can set the width of the column to an absolute value
not super nice but nicer than margins at least
 
yeah the bound box around the gauge is way bigger, that's the problem
 
8:30 PM
Try setting Width = "60"
looks about right from the screenie
 
I get width and height must be non negative
 
that is probably a bug in the gauge
have fixed a bunch of those
 
it looks okay, but I need to make it bigger to add more tick frequencies, a frequency of 10 is not accurate enough for the application
at the current size, adding more ticks mushes it all together
 
I don't think you want ore than 10
Maybe minor ticks
Also you can output the current value in a textblock
 
yeah I mean the ticks in between the 10
I guess so actually
so with the range property, (when its added) should I just be able to bind to two values, fro eg, 80 - 100 and that will highlight that section of the gauge? If so that would be sweet!
 
9:00 PM
@ReedCopsey so I have Array which after COM call gives me `short[]`.  I call
var vals = sasVal.Cast<short>(); // cast each element in Array to short, stuff in vals
parameters.AddRange(vals.Cast<ushort>().ToList()); // i want to add to List<ushort> without looping through and casting each element
but calling that, I get ArrayTypeMismatch... don't see how.
 
where are you getting the mismatch error?
and what is parameters?
 
at the AddRange
vals.Cast<ushort>().ToList()
 
because, if its actually short[], you should be able to just do parameters.AddRange(sasVal.Cast<ushort>()) directly
 
@ReedCopsey its all happy until runtime
Source array type cannot be assigned to destination array type.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.SZArrayHelper.CopyTo[T](T[] array, Int32 index)
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
   ....
 
anyone know why, if I run the application file in the debug folder of my project it doesn't run? It runs fine through running with VS
 
9:06 PM
it's stupid, but you have to do:
parameters.AddRange(sasVal.Select(v => (ushort)v));
the problem is that enumerable.Cast is dumb, and boxes the values
so it boxes to a boxed short, and then tries to cast to a ushort, and goes boom :(
 
will read. thanks! I was hoping I didn't have to .Select but gonna have to
 
you don't need all of the temporaries, though
 
yep. ridding them
 
if there was a Enumerable.Cast<T,TResult>(IEnumerable<T> values) then it'd work
but since Cast<T> is only IEnumerable (non-generic), it boxes then goes boom on value types
 
still have to call .Cast<short> on the Array though
@ReedCopsey yeah, that would make sense
 
9:11 PM
@NETscape why the .Cast<short>?'
you shouldn't need to do that
or are you getting Array instead of short[] ?
if you have short[] there's no reason for a Cast<short>
 
9:39 PM
@ReedCopsey yeah I start with Array, then have to cast after the COM call to short[]. then to ushort[].
ahh, could probably Cast + Select on same statement
yep. so array.Cast<short>().Select(v => (ushort)v)
 
@ReedCopsey Got 5 seconds to answer a simple MVVM Yes/No question?
 
@LynnCrumbling I think your 5 seconds are up ;)
 
Indeed. @BradleyDotNET Any interest? :)
 
Go for it
 
Project is WPF, MVVM. I have subclasses that are derived from UI elements. Should those live in the viewmodel, or their own separate class files .. as a best practice?
So - "MyListBox" - its own code file, or in the VM?
 
9:47 PM
Code file
that was easy :)
 
Excellent.
Thank you sir :)
 
code files should have one class per file anyways
 
It felt completely wrong to be stuffing from in the vm .cs.
 
anyone able to help me with an exe problem
?
 
That would be because it is completely wrong ;)
@BrianJ We can try
 
9:48 PM
Well, let's pay it forward. @BrianJ go ahead.
 
I've tried to launch the .exe file in my debug folder for my WPF app, but when I run as admin nothing happens
 
@BrianJ Check the event log. You're probably missing dependencies. Copy those to the debug folder, and I bet it launches.
 
Like, nothing nothing?
Not even a "this program stopped working"?
 
its showing GesturePhysio.vshost.exe in the details tab in task manager but the app doesn't open.
yeah no errors or anything
 
The vs host is from Visual Studio
so is unrelated to launching it from Explorer
 
9:50 PM
@LynnCrumbling and where would this event log be?
 
If you have logging, you could log on Application_UnhandledException as well
 
@BradleyDotNET thats what launches everytme I double click the exe in the debug folder
 
@BrianJ Also - put a sleep() at the beginning, then attach to it with the debugger.. (the sleep gives you time to attach) .. or better yet, add a debugger.break()
@BrianJ The Windows application event log - in the event viewer
 
The application file is the item I'm clicking
okay @LynnCrumbling I'll try that
 
If the event log doesn't have anything in it, then attaching a debugger to it should give you some sort of information in the output window.
Hopefully, the eventlog says that it can't find a file.
That's your missing dependency.
 
9:53 PM
@LynnCrumbling do you mean the Task Manager? If so nothing related to the app shows in the "processes tab"
 
If you have VS ultimate you could see if generates an Intellitrace dump as well
 
okay so first things first, event log
 
@BrianJ eventvwr.exe -> Windows Logs -> Application
 
but logging (can't believe I'm saying that) is really helpful here
 
okay its open now
so I'm in the application view
loading..
so what exactly am I looking for in this window? @LynnCrumbling
 
9:57 PM
So it's event log entries.. you care about errors.
 
okay I see errors here relating to the app
 
Look for errors in the last .. say.. 30 minutes or so.
Paste the desc?
 
okay as far as I can see its these two errors in common at launch time of the app
 
00:00 - 22:0022:00 - 00:00

« first day (864 days earlier)      last day (3285 days later) »