last day (4150 days later) » 
08:00 - 14:0014:00 - 17:00

2:00 PM
So it's BAD:
<ScrollViewer>
    <StackPanel>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <ListView Grid.Row="0">
                <ListViewItem Content="1" />
                <ListViewItem Content="2" />
                <ListViewItem Content="3" />
                <ListViewItem Content="4" />
            </ListView>
            <ListView Grid.Row="1">
                <ListViewItem Content="1" />
vs good
 
let me see
 
<ScrollViewer>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <ListView Grid.Row="0">
                <ListViewItem Content="1" />
                <ListViewItem Content="2" />
                <ListViewItem Content="3" />
                <ListViewItem Content="4" />
            </ListView>
            <ListView Grid.Row="1">
                <ListViewItem Content="1" />
                <ListViewItem Content="2" />
 
you want both listview to take all space ?
 
yes
 
well that's the case for your second example right ?
 
2:02 PM
I mean all space... I want the to share all avalilble space
mm
 
share all available space ?
 
ehh well if you past the XAML to a window you will understand
( I hope :) )
 
well i did
i have the two listview that tales halfk the windo each
isnt it what u want ?
 
yes
:)
 
then what is your issue ? :D
 
2:06 PM
I dont understand why you want a stackpanel in there? (in your first example)
 
but in my program I have more than just the two listviews in the grid, and I would like to place them all in a stackPanel
 
hoooo
ok
me is hard at understanding
 
so still the question remains - why stackpanel?
you could just use more rows / columns?
 
mm that's a good question...
 
you could generate rows in code behind
but well
let's see with a panel
hmmm
what you need seems contradictory
you want your listview to take all space
 
2:08 PM
hehe
 
but you use a SrollViewer
 
nono not at all :)
 
that makes no sense :D
 
well it does if you involve minimum height / width
 
well it could
so what do you REALLY want ? :D
you want your listviews to take all space ?
with a minimum height ?
 
2:11 PM
to be honest it's older code that already contained a stackpanel, and so I wanted to add them and take the remaining space
with a minWidth
 
given your xaml above - stackpanel is pointless
 
+1
 
go with minWidth on listviews and throw them in grid directly
 
mhmm but there are more controls in there as well
 
you mean minHeight right ?
 
2:12 PM
mm
sorry
 
@Markus so stack Panel has Grid + other controls ?
if thats the case, StackPanel is still a bad choice for this stuff - you should try going with DockPanel
 
yes
 
if i were you, I'd take the grid out and make it fill child of dockpanel
 
yeap that would be a good idea
 
and dock rest of stackpanel in bottom pane of dockpanel
 
2:14 PM
and make sure it's the last child
in the dockpanel
so that it takes all remaning space
 
well it will be top the but I see what you meen
 
ok top it is then :D
 
being top or bottom, it has to be the last child ;)
 
so to be sure we're on same page
<DockPanel>
	<StackPanel DockPanel.DockType="Top">
		<other user controls />
	</StackPanel>
	<Grid>
		<your listviews setup here />
	</Grid>
</DockPanel>
thats a minimal cut paste job that should get you what you want
 
mm I'm testing now
 
2:17 PM
that attached property may be named differently - I've just pulled it off memory
 
hehe almost! that did almost exactly what I wanted, I have to try and attach minHeight as well
 
DockPanel.Dock
 
yes I haven't forgotten that :) just that my listViews get "auto" height, and that means showing all items
naa not quite... arrgh yet it's so
in the example you don't really see the effect I got...
 
our examples are a bit trivial :)
@Markus you could throw MaxHeight in there
you obviously have too much space available to consume in grid
 
you see in my real project there are also scrollbars on the listviews, and I would like to have a MinHeight on them rather than having the scrollpanel "start scrolling" when I shrink the window
nono I don't need a MaxHeight, it's the Min that's the problem
 
2:27 PM
oh
sorry
 
np
 
well probably can't help you much if we can't see the actual xaml layout
but trial and error should get you there :)
time to make some tea.. or something!
 
tea time :)
 
Ok, so this example enlightens the new problem
(the listbox's scrollbars never get's activated)
<ScrollViewer>
    <DockPanel>
        <TextBlock Height="30" Text="TEST" DockPanel.Dock="Top"/>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <ListView Grid.Row="0" ScrollViewer.VerticalScrollBarVisibility="Visible">
                <ListViewItem Content="1" />
                <ListViewItem Content="2" />
                <ListViewItem Content="3" />
                <ListViewItem Content="4" />
 
because of SCrollViewer
take it out and you'll be fine
 
2:40 PM
yes, but it's a little more complex than just a textbox, so I need the scrollviewer for all the controls
the height of the aggregated controls (that is represented by the textbox in my example) is about 200 - 300px and sometimes it gets expanded as well
 
well
your listView will never have a working scrollbar in this example
they are in a panel within a scrollviewer
so they will always take all the space they need
if you set a maxHeight
except
 
hmm
so the only solution you see is to make a own panel of some sort?
 
well
fisrt thing
you sould really know what you want :D
what is the kind of beahviro you want ?
multiple scrollbars ?
what should happen when you scroll ?
 
@Markus use a scrollviewer around them - not around the entire thing
 
this will be komplex to describe in text, but i'll try...
first of all. when the window is bigger than the context of the listviews it should work as it does now.
@Maverik but I will still need it aroud the whole
2-300 was a understatement as I think more about it... rather 600-700
nae maybe not that much but..
anyway
when the window gets smaller than the context, but larger than a minHeight of the listviews the sb on the listviews shall be activated
 
2:52 PM
<DockPanel>
    <ScrollViewer DockPanel.Dock="Top" Height="50">
      <StackPanel>
        <TextBlock Height="30" Text="TEST 1" />
        <TextBlock Height="30" Text="TEST 2" />
        <TextBlock Height="30" Text="TEST 3" />
      </StackPanel>
    </ScrollViewer>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <ListView Grid.Row="0" ScrollViewer.VerticalScrollBarVisibility="Visible">
            <ListViewItem Content="1" />
that won't work?
 
and when the window get so small that the lb's are getting to it's minHeight, then the scrollviewer should get active
@Maverik without the scrollviewer you mean?
 
now this example has scrollviewer for your controls while listview use their own
but i guess you're talking about even smaller window
 
well let's say that you are running this on a screen with rather small resolution, then I wouldn't see the listviews at all
The point is that it should be nice independent of the resoultion
at least as far as possible
And in this example it look strange to have two scrollbars next to each other, the listboxes is actually a UC with two listboxes and I have some margins and what not, so.. if you saw it I think you would get what I'm trying to do here.
 
no i think i get it
but its not exactly an easy situation
Hey @user1744567
1
Q: WPF: ListView inside of Scrollviewer; Layout question

Jani do have a question about layouting with a listview inside of a scrollviewer. Once a listview is inside a scrollviewer it does use it's maximum size and doesn't scroll itself cause the scrollviewer offers unlimited amount of space to the controls inside of it. The problem is, that controls that ...

 
I mean, it wouldn't be that hard would it? something decides that the LB should be min the height of all it's content, programmatically it couldn't be that hard to use the minWidith instead...
 
3:04 PM
seems like what you're trying to get
 
Hi user !
we're getting new guys :D
 
problem is, because of scrollviewer on the outside - listeview has infinite space available
 
yeap
 
unless you contain it somehow - its own scrollbars won't activate
 
MeasureOverride will be called with an infinite size
 
3:05 PM
so you either need to give a maxHeight
 
but to my mind it's more of a functionnal issue
 
or find another way of doing scrollviewer
 
if you are able to clearly state the behavior you want, it's easy to do
 
well he sort of did :P
 
hmm
i actually didnt read everything :D
 
3:06 PM
check the question i linked - that is pretty much what he wants (though his controls are more complex)
i know :P
 
evil me
I'm ashamed
 
tl;dr - nothing to be ashamed of :D
 
hehe I have read the question. Yes it seem to be almost the exact same problem. Sadly he didn't get any real answers.. :)
well well I have to finish up now... Might pop in tomorrow with more annoying questions (or more of the same) :)
 
@Markus well according to his tick - he did :P
I dont think you can work with your current scenario - you have to set some boundary
be flexible - but don't bend to the point it breaks ;)
 
nae he marked it as an answer, but it didn't solve his problem (last comment)
Maybe I could fix this I got a better understanding of the size-system in wpf. bye
 
3:14 PM
Aa i didn't read his last comment - but they're saying the same thing
bbye
 
bbye Markus ;)
 
considering the age of our room - we already have two visitors
hopefully we'll have some residents soon
 
yes
that would be great !
I don't understand what the guy wants : stackoverflow.com/questions/12956749/…
his original xaml already stretches ecerything
 
at 64% accept rate of a 1k+ rep user, I can't be bothered to waste my time for him
 
ho by the way
what does accept rate mean ?
it means he rarely accepts answers to his questions ?
 
3:24 PM
yea
of the questions he posted - he only accepted 64% of the answers and left the rest hanging
 
weeeell
 
i.e. can't even be bothered to give credit for time spent by different people
 
I'm not paying enough attention to this stat :D
 
its the second thing i notice
first is the rep :)
 
:)
 
3:25 PM
under 200 rep - i'm forgiving
 
thx for the tip
rofl
above, you execute ?
 
between 200 - 1k -- my forgiveness rate is inversely proportional to rep and directly proportional to accept rate
so high rep - low accept => i'll skip right past
 
0
Q: Using multibinding to set custom attached property in WPF

eoldreI have a MVVM WPF project where I am attempting to set the value of a custom attached property using a multiconverter, which should be passed a property of the DataContext (ViewModel) and another custom attached property on the element. I can bind the property to the viewmodel directly using th...

what about this one ?
forgivable ?
 
yea
though I'd nudge him to accept answers - not letting newbies know about accepting answers sends them into bad habits
 
the bounty I answered is actually the most frustrating. The guy put a bounty stating his question did not attract anought attention, then doesnt even bother to answer comments
yeap
 
3:30 PM
ok this particular guy has 100% accept rate actually
the questions he didn't accept answer to were unsolved
 
ho
so this can be misleading
 
i normally click through to their profile and click questions before abandoning them
its still not a very positive sign - the guy must have solved his own problem that he posted in May, for example
 
@RaheelG Hi there ^^
 
he should have answered his own question and marked it - others could have benefited from it and he would have had 100% accept rate
hey @RaheelG
 
Hey
 
3:33 PM
yeap that's what i usually do
i have very hardcore question I answered myself
this one : stackoverflow.com/questions/12350695/… is actually pretty unbelievieble
it's a .NET bug
 
Take RaheelG for example
he asked one question - he solved it but he didn't answer it
 
I didn't know I was supposed to
 
his answer is in comments - it will drop his accept rate in future
 
Should I do that?
 
yes you should
 
3:35 PM
yup !
 
all users have an accept rate - lower accept rate will lower the attention you get from users
 
I never post on stack so still learning the rules.
 
nah its not a rule
 
it's a good habit
 
we were discussing accept rate before you walked in
 
3:36 PM
that will benefit you if you keep positing on SO
 
so yea, if you solve your own problem - feel free to post your own answer (theres even a badge for it)
 
:)
 
of course its rude to post your own answer which drives from somebody elses answer in thread without giving credit and reason you derived but you're welcome to post your own answers
 
Shiny badges!
 
:)
its a good feeling!
my first badge was Self Learner i think
(answering own question)
 
3:38 PM
nice one :)
2
Q: WPF TreeView leaking the selected item

SisypheI currently have a strange memory leak with WPF TreeView. When I select an item in the TreeView, the corresponding bound ViewModel is strongely hold in the TreeView EffectiveValueEntry[] collection. The issue is that it is not released when the ViewModel is removed from it's parent collection. H...

this one was a pain too
the solution i provided is not even satisfying
another .NET framework bug
 
well I try not to subclass if I can help it
saves a lot of headache
I had almost done TreeView subclassing until I learned the MVVM way of doing it
it was SO MUCH cleaner
 
well if you have a better solution for this one, I take it
 
>.< I kinda skimmed over your question :D
 
haha !
it's kind of good to know
well
 
I can see your question - but I can't tell why you subclassed?
 
3:42 PM
If you use a treeView, if the last item is deleted, it will still be strongly hold by the treeView
hmmm
that's because i already have a subclass in my application
 
aaa
 
it was possible to use a handler of course
 
I was resorting to subclassing to handle SelectedItem
 
^^
 
and then I learned its a lot easier to bind that property rather than do it through OnSelected...
 
3:43 PM
actually basi wpf treeView lacks too much stuffs for my application
we have our own specialization ^^
yeap
^^
0
Q: Binding Listbox to a DataTable using Binding

dmarucaI'm new to this and Google isn't helping me this time. I was able to follow some examples and populate a DataGrid and modify a database, but ListView is giving me a problem. Here is my class: public class GlobalDataviews : INotifyPropertyChanged { ... //Billable data table //Popu...

i just love the title
binding using binding :D
 
kek <-- WoW orc language for "LoL"
 
LOL
didnt remember :P
i'm playing alliance, I should know :P
 
oh ! Holy Night Elf Priest here XD
get him get him!! foaming at mouth orcs
 
:D
 
i always loved Blood elves though
 
3:47 PM
yeah
 
Aa good old days - I remember creating hybrids!
 
all my chars were blood elves back when i as playing horde
 
like i made this char wiht the body of draenie & head of a blood elf <- a shaman on top of that!
 
...
don't even want to imagine that
 
Bitmask manipulation :)
I was WoW emulator developer for a private server
and I was bored!
I was exploring the client capabilities.. it was awesome! you could instantly tell it was my char just by look at his unique hairstyles
or body attributes
wow has so many hair styles & colours available in its client that aren't exposed to players
you can only force them from server side (presumably for special npcs)
i think only two developers on that project were that ambitious
 
3:52 PM
that must have been fun
^^
 
the other guy was hired by Wine afterwards
 
I see ^^
 
he was into bit manipulation too but he went into memory manipulation
he was optimising storage / network packets and he managed to do two coordinates in a single byte through some matrix manipulation
my mind could not follow his math!
but mm suffice to say i found the guy to be a genius
if you like WoW - try being a developer on a private server
its super fun!
@RaheelG - Mark your own answer as "The Answer" by clicking the hollow / gray tick next to your votes
also it would be nice to attribute the comment that made you look for typo :)
@Sisyphe btw - that user i was talking about earlier - he had other answers that he hadn't accepted - thats where his accept rate was dropping
 
yeah I saw that
 
I hadn't noticed the shade difference in answers
they should change it to be a bit more evident
 
4:00 PM
I may try to develop on a private server :)
 
do it on a populated server :)
 
but well, I already have so much to do , and so little time
:D
 
its no fun doing it on ur own little server
 
yeah
 
though most servers will want to see u in forums for a bit before picking you up on their dev team (its a trust thing - they want to "know" you before they pick you up)
oh and this sort of thing sits pretty nicely on cv ;)
i got my present job cos of my wow development!
 
4:02 PM
seriously ?
 
i hadn't even applied in a development role
 
running private server is kinda illegal right ?
 
it is but you're not running it :)
 
lol
 
also blizzard doesn't come after private servers unless you're massive
like say you have 10k players on you
any server with 1k - 1.5k players - they don't even bother
litigation isn't worth it
most servers have player base number well below 1k
 
4:04 PM
so they dont care
 
pretty much
 
:)
 
shutting down private servers is only worth it if the players you shutdown pay you in subscriptions as a result
at conversion rate of like 1% to 3%
its not worth it generally
in fact - most players don't even change servers
having been through C&D phase twice..
servers basically shut themselves down
go dark for a few weeks - then come up as a brand new server and start fresh
I started from BurningWoW -> renamed to something i can't recall -> renamed something else i can't recall -> renamed to PhoenixWoW
of course we lost players during those transitions (not all of them were C&D transitions - mostly it was owner change)
but most vets know about this going dark & rebirth - so they just ride it out
actually i remember my first MMO that went through same thing
 
I tried to click the hallow arrow but it says I can accept my answer tomorrow
 
AnimaRO -> owner died -> renamed to aRO -> management dispute -> rebranded into tRO & aRO -> tRO because BlackTalonRO i think and aRO rebranded to something else -> then it became AnthemRO
@RaheelG oh probably because you're a new user - that limitation should go away soon - once you've accumulated some more points
AnimaRO -> AnthemRO is about a decade of transition and my original Priest is still there (actually its on both off shoots)
joys of private servers :)
 
4:16 PM
I actually hosted a RO server ^^
 
what are the chances!
 
:D
it was actually really great ^^
 
:)
well my online best friend is from RO
shes tad younger than my mom! but i never knew that until we got to know each other in real life
 
nice ^^
that must have been a surprise :D
 
something that I love about online community - we're all equal
well yea.. a bit
 
4:18 PM
yeah
 
not as much as another guy who was in his 70s and was her dad
 
that's something I love too
 
they had a guild in RO that was a family guild!
 
OO;
that's something :D
 
her daughter was in game - her brother was in game - her dad played .. her nephew was in game i think
i have one amazing bond with her. The only person i can safely say "we're friends because we want to be"
we have nothing to offer to each other besides a random chat
we dont even play together anymore
 
4:22 PM
I'd like a friend like that :D
 
i know - i've often wondered if i can say the same about my best mate in real life!
we always have something to offer to each other - no matter the situation.. sometimes i've wondered how will it be if we didn't
 
mayeb one day you'll find out :)
 
the thought of losing him because of failing that test - I'm not sure i wanna find out!
i guess I'm closer to him than most people
my parents have joked about us getting married one day XD
but yea.. we've been mates for over a decade now and seen some pretty rough times together
and I'm not sure if it would be same with anybody else - chances are I'll lose trust in everybody if i lost it in him at this point >.<
so hopefully not!
back to a more technical thing
have you tried dotPeek & JustDecompile?
 
4:47 PM
sorry it's getting crazy around here
I understand what you mean ^^
and no, i never tried them
 
yea i figured you're busy
 
well sometime it's just : everybody askin me somthing different at the same time T-T
 
:)
and I'm not pinging enough!!
 
I don't know if you guys have done much Windows 8 app development but do you know if there is a way to clear Data bindings from code. BindingOperations.ClearBinding does not exist in WinRT
 
Nope sorry, haven't gotten around to metro coding yet
doubt Sisyphe has either, check in general C# room
failing that, need to post an SO question
 
4:56 PM
Alright thanks
 
np
 
08:00 - 14:0014:00 - 17:00

  last day (4150 days later) »