« first day (1376 days earlier)      last day (2773 days later) » 

5:42 AM
good morning.
 
6:02 AM
Hi
Good morning..
I hava a doubt in wpf application..
i have converted video to byte array and stored in database.. can we convert back to video from byte array or memorystream .. so that i can play in mediaelement..
As we are doing for images..?
 
Sure.
All data is bytes, so you can do the same conversion you did, in reverse. It might not be the most efficient way of storing video, but it's possible.
 
6:26 AM
after getting byte array from database ..what should i do store as video in local
currently i am trying to use File.WriteAllBytes
to create a video file.
 
6:44 AM
That's probably a wasteful step. What data type does the media element expect?
Create a MemoryStream from the byte array and bind the MediaElement's Source to it.
 
7:17 AM
@JohanLarsson what are these controls supposed to be?
 
7:53 AM
@milleniumbug I think he was just going for text inside an ellipse.
 
mediaelement expecting Uri type
Like C:/temp/wildfile.wmv or for eg:Youtube url
i can't able to set memorystream to mediaelement
 
8:21 AM
@milleniumbug yeah, text inside (over) ellipse and horizontal layout
Just a random change, the nice thing is that it is the same data en listbox just shaping how it renders diffrently
 
How do I use ConverterParameter?
I have this: ConverterParameter=TargetMarketCountryCode
I basically need the parameter as a string.
Oh. There's a parameter object.
How did I never notice that.
 
8:53 AM
@WilliamMariager Because no-one ever uses the ConverterCulture and TArgetType parameters at first. :)
 
Hehe
I'm using Culture. Still haven't worked with TargetType.
 
I sometimes miss the bindingexpression passed in to the converter
 
9:17 AM
That'd be awesome.
 
9:49 AM
sigh I really have to throw some money after a ReSharper license ...
 
 
1 hour later…
11:12 AM
I should really try and handle nested arrays in a prettier way :P
Perhaps show it as a single nested item unless an additional index is added. It's very rare to even use additional indexes.
 
12:11 PM
Good morning!
 
hey
 
Hey franssu
 
what's up
 
Nothing much. Got a console app that calls a web service about 4100 times! The darn thing isn't designed for batch processing.
You have to call it with each person's ID, process the results, call the next person. Wash, rinse, repeat
 
12:29 PM
:S
 
1:00 PM
After wrestling with it, discovered it's pointing to the dev system and so lots of data is missing
 
1:29 PM
o/
 
\o
 
So here's a peculiar hiccup.
I have a TextBox bound to a decimal. I can write numbers and letters. Letters make the value invalid per validation, but I can't type in decimal points.
 
you're probably gonna wanna share the validation logic ;)
 
might be a culture problem
 
1:45 PM
@WilliamMariager WPF uses en-US as default culture, are you typing point or comma as decimal separator? Also a lib for numeric input
 
There's no manual validation, all I get is the exception from the default string to decimal converter.
@JohanLarsson I've tried both.
<TextBox Grid.Column="1" Height="22" FontSize="14" Text="{Binding DataContext.Value, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MeasurementView}}, UpdateSourceTrigger=PropertyChanged}" />
That's the full extent of the TextBox and it's binding.
 
looks right, I have not used decimals much, testing
 
@milleniumbug beautiful!
You have used a decent % of the stuff that you will use over and over in WPF now I think.
 
1:51 PM
Looks like what I'm experiencing is intended.
As far as I can tell, it eats the decimal immediately since it converts 1. => 1
 
oh, yeah that is tricky when using UpdateSourceTrigger=PropertyChanged should have thought of that
The lib I linked handles stuff like that
 
default it validates on lost focus like a vanilla textbox
there is a validationtrigger property that can be set to PropertyChanged for realtime
@milleniumbug you can use other types of panels in the ItemsPanelTemplate if needed, sometimes uniformgrid and wrappanel is nice
 
@JohanLarsson It took me a while that the panel needs to be in the ItemsPanel
also that you don't set a property on the ListBox to make it horizontal
 
yeah, it is not obvious
it is nice design imo, compose with the panel
the xaml is perhaps not so nice :)
 
2:00 PM
indeed, sometimes xaml obscures what should be obvious (like binding expressions)
 
2:35 PM
Ahh, the joys of object hierarchy in XAML bindings... almost forgotten how nasty the syntax can be when you embed an ItemsControl inside a column of another ItemsControl
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGridRow}}, Path=Item.EmployeeStatusVMs}">...
What made it worse, the outer container is the evil DataGrid, from when I first started building this WPF app... before knowing about ListView
 
you should put your inner ItemsControl in a UC
and then give the UC a data context of its parent
cleaner imo
 
Nah, let's make it as dirty as possible :)
Good idea, Julien
When I first started with WPF, everyone kept talking about views and I wondered, what's a view? All I see are user controls. Then I said, "They're the same thing, dummy!"
What are you working on these days, Julien?
 
 
3 hours later…
6:00 PM
UCs are for noobs!! DataTemplates ftw!
everything is just a datatemplate :)
Windows->ContentControl .. that's all the "view" xaml you need :D
 
6:14 PM
Well, I am a certified noob, after all ;)
 
 
1 hour later…
7:22 PM
UC gives you a designer view
 
7:36 PM
you mean you don't see designer in the eye of your mind? O.O
i'm so ashamed!!
 
8:15 PM
hahaha, I'm a noob too ;) I use UC everywhere
most of my templates are just defined as a user control ;)
 
@ReedCopsey, welcome to the wonderful world of noobs. There's a worldwide organization for us... International Certified Noobs, or ICN for short
 
though, my current idea is to work on an entirely new way to define user controls :p
 
Been using UCs everywhere
 
think I have it worked out conceptually, too
(and finally will have a good use case for onewaytosource bindings :) )
 
8:47 PM
Is there a way to detect if another window is being moved over the current one?
 
hook the windows api and look for invalidation messages, and check the rect
would probably do it
but that's not even 100% reliable on modern OSs, as the DWM can mitigate that
 
I was afraid someone would suggest hooking.
 
I don't think, as of Win7+, there's actually a way to do it 100% reliably - but hooking should work most of the time
 
should be about the same for a window moving over a control right?
 
9:23 PM
yes
though even harder in WPF with a control
since you can't hook a control (it's part of the same shared hwnd for the window)
 
Ya... Been catching up to that.
Looks like the only messages that are being fired on the bottom window are PAINT, NCPAINT, and ERASEBKGND. Which only get called when a previously covered part of that window is exposed.
I have two other things to look at though.
 

« first day (1376 days earlier)      last day (2773 days later) »