« first day (3318 days earlier)      last day (1615 days later) » 

1:56 AM
Good lord.. For heavens sake... no one told me WPF would be this difficult to constrain and edit
its like learning html with like 20 different frameworks melted into it
theres like more than 100 ways to do everything..,. bruh..
Well, atleast I can style buttons with a fricking gradient now XD
It took me an hour to figure out how to set the dimensions in pixels so it wouldnt cover some of my elements
even longer to understand columns lol
...
Anyways, sorry for venting.. just tired
 
 
1 hour later…
3:18 AM
WPF is difficult to constrain, but it can fits almost all monitors include mobile and tab
 
Im only using it for Windows at the moment
Im slowly converting to WPF
like.. everything
everyone says its so much better.. yet half the code ive written no longer works... Things dont even have selector names by default... AND FOR FUCKS SAKE WHY DOES THE WINDOW REMOVE LIKE 10 PIXELS OF SIZE WHEN I RUN IT...
sigh lifes hard m8
 
 
7 hours later…
10:17 AM
hello !
 
 
6 hours later…
V.7
4:37 PM
Hey all o/
Currently trying to handle MouseUpEvent using DependencyObject and can't get why it doesn't work at this moment
A small sample showing logic: sendspace.com/file/foq3dg
Where mouse up event on text block should be triggered, but nothing happens for some reason
 
Morning
@V.7 Why are you triggering off of mouse up.
That doesn't seem like a good one to go off of
if you go to Properties (F4) and view the events you can add it there
 
5:30 PM
Im new to WPF, why are some borders mising?
I changed the border-boxes to be far from the right and bottom borders, and they are still cut-off
also that button is also doing it, I changed border thickness to 1 1 1 1 on each to be sure, still having this problem
Oh, forgot to mention, the right and bottom borders of my central window area are also missing :(
 
WPF is a pain in the ass. They thought they were doing us a favour with making it so much more customisable
Except that that made it that much harder to make it do something normal by default
 
is there a way to fix the borders? I heard about disabling EnableColumnVirtualization
but I couldnt even figure out where that went
apparently, the virtualization uses the border-box and columns/rows to delete bits of the window to speed up performance
just wanted a custom window... ffs why is everything so fucking annoying nowadays//
Managed to fix the border on the button, the other things still arent working... sigh
 
My experience is similar to yours, play around with a few things then give up
 
It's probably margins
It's always margins
Protip, learn to write xaml. If you don't use the WPF designer your life much easier because it won't do stupid shit
 
I really like XAML. How powerful WPF binding is just works for me
but it has some stupid defaults that make your apps look like crap and you have to put in a lot of work to make them look decent, which I hate
 
5:46 PM
I don't mind the defaults. Apart from window background, I've released a bunch of things with entirely default styling
(and I only change the background to Control so the windows look like Winforms ones_)
 
Hey guys!
I am working on a CQRS project and trying to build a resolver for command handlers. I feel like I am on the right way but missing smth obvious. Can smb please check the code and tell me how to achieve my goal?
https://pastebin.com/P9QgcKKf
 
Had to convert my project to pixels earlier because the WPF Designer removed like 10pixels of space if you set it to *
 
@Kiramm what's the problem?
 
Yeah, I noticed some things have negative margins
 
oh, the question mark?
I think you want something like IHandler<T> GetHandler<T>() where T: BaseCommand;
 
5:55 PM
Can someone please provide me with a specific method of fixing the broken window borders
THis thing is starting to piss me off, ive tried everything, resetting margins, remaking the whole form, moving it left or right a couple pixels
nothing is fixing it..
 
@TomW I want to create a simple resolver like I mentioned in the comments section. The problem is that code doesn't compile :)
 
@Kiramm what does the error message say?
 
???
Does no one know how to do this in WPF ;=;
 
@TomW give me a sec to move that example to some online c# compiler
 
@TaylorS there are five people online, one of them is you
 
5:58 PM
@TaylorS no exp. with wpf :/
 
,-,
 
three of them have reacted to your messages and clearly don't know
 
this is the only place I can ask, because SO has question banned me even though Ive earned over 370 rep
and Ive been googling for hours, no results on my issue
this is one of those moments in my life where everything goes wrong on my end, but for everyone else, it seems like nothing bad ever happens, and I cant find a solution, so im mentally slamming my head against the wall
 
@TomW here's code in a compiler
https://dotnetfiddle.net/UBs9oH
 
@TaylorS have you tried Snoop? I'm only vaguely aware of what it does but a lot of people say it's useful for finding issues in WPF apps
 
6:03 PM
This issue literally occured when i first created the XAML form .-.
Is visual studio just screwed up or something??
Ill try it out and see if its useful for what Im looking for
 
@Kiramm in this situation you pretty much have to have a switch case over type, or delegate it back to your DI container, there isn't really a quick or neat way around
 
@TomW hmm, ok. I think I will try to use DI to create it for me. Thx for the suggestion!
 
oh... it just seems like a slightly more information version of the visual studio debugger
just collects event data and binding data
 
A nice technique I learned a while ago is to register an implementation of Func<T, IThing<T>> as container.Resolve<IThing<T>> then let your service have a constructor parameter of Func<T, IThing<T>> which it calls
 
shows you if things occur or not.. doesnt seem to be for the "styling aspect"
 
6:07 PM
@TaylorS I dunno, I've used it once I think and I don't really remember what it can do
 
@TomW cool! will try this for sure!
 
@Kiramm the point of that is that your HandleProvider doesn't know anything about the container, it just knows it has to invoke a Func, the binding of Func to the container is in the container so you don't break encapsulation
 
The one time i need a WPF expert, theres none on :(
but when im working with winform: "WPF Is better" and then i notice a ton of people talking about WPF soon after
 
@Kiramm here's another thing to think about: What's the difference between IHandlerProvider with one method IHandler<T> ProvideHandler<T>() and Func<T, IHandler<T>>?
IMHO there isn't really one, logically. An interface with one method that returns a value has the same utility as a Func that provides a value, the only real difference is that the Func's single method is always named Invoke
 
@TaylorS Unfortunately we aren't mind readers. Post the xaml in a gist and we will be able to have a look
 
6:16 PM
voila @CaptainObvious hatebin.com/vldjcztbll
 
Cool, I'm taking a look
 
I attempted pixel by pixel fixes, but so far, nothing viable
borders always missing, I was considering starting from scratch
 
WindowStyle="None" what's this
 
Custom window
I hate windows style on my updater
 
Pixelhacking in WPF is a bad time
 
6:20 PM
My hunch is something like you haven't wiped all the default styles, just that one
 
@Tom Did you not notice the custom chrome
 
Thats the only method I saw to "customize the window style"
 
It is without pissing about with DWM and GDI
 
No idea what that is
I just started with WPF yesterday, its very confusing.. and exhuasting
 
What exactly were you trying to customuse though? "Custom" window chrome almost always looks shit
 
6:21 PM
@CaptainObvious whar custom Chrome
 
Just wanted to originally make flat grey window bar,
 
So what I'm getting at is that I think WPF overlays several different styles it calls Window, something else, something else, and so on, and you've zeroed one of them but not the rest, so you're seeing part of the default left over
 
but it just started removing edges and borders, and looked generally trashy
 
What's wrong with the default Windows ones?
 
So how do I clear all the default styles
 
6:23 PM
yeah so if you'd zeroed all of them it would look like complete shit, currently it only looks only partial shit
 
:L
 
Hey, I don't know, I'm half-remembering things I read conceptually a lot of years ago and never actually did much with
 
How is it partially NOT SHIT LOOKING by missing edges and borders and the border radius looking trashy... yet if I deleted all the defaults and fixed the borders, your basically saying ti would look worse
 
I last did desktop development in 2010
 
._. Confused Anxiety
 
6:24 PM
Yeah it will, because then it knows nothing about how it should look
 
Right
For one, you need to learn how the columns work
 
So far, theres like a million things in WPF, so, so far not so good in terms of trying to learn things
 
But basically
I think you're being bamboozled by a "feature" of Windows 10's DWM
Actually maybe not
Another thing to be aware of is WPF is kinda pixel independent
 
Im seriously wondering how people call this development style... "better" then winforms... So far Ive had more errors, issues, styling messups, and all the things in the book then you could imagine
 
But seriously
 
6:28 PM
tenfold compared to my whole time working with Winforms
 
If you don't have a grasp of the WPFM grid system, you're never going to make anything that looks any good
 
yeah so when I said
 
Where do you suggest I learn it..
 
54 mins ago, by Tom W
WPF is a pain in the ass. They thought they were doing us a favour with making it so much more customisable
 
Well basicaly
Look at this
 
6:30 PM
lol its already 130pm... that means ive spend like nearly more than 12 hours on a fricking button, textblock and custom window
 
You've got a column going down the middle of the control for no reason whatsoever
But then your button which is clearly meant to be right aligned is LEFT ALIGNED
WPF Doesn't give a rats ass that you say the window isn't resizab;e
 
;-; idk how this works, gee sorry, i was just attempting to add a column so it had a more perfect measurement
 
Okay
But basically
 
I guess im thinking of this more like html then a form
 
You need to use a heirarchy
At the moment all of your controls are in the main grid which is no good
Hold on
So the orange is your main window grid
 
6:36 PM
ok
 
But the only thing that should contain is 2 grids (outlined in red)
And then you can use an inner grid to divide your main content area
While not breaking anything else outside of that area. I would also put the title bar controls in their own container
 
So how would I create this "inner grid"
 
Just put a grid inside the grid
I'm working on it now hold on
How you should lay out those controls
 
yo dawg we heard u like grids
 
why doesnt WPF just do that by default then
 
6:41 PM
It has no way of knowing that you want that
 
no... I mean, like if your content should be inside an inner grid, why doesnt the default form thats created just include that
 
It does
But you need to create more grids
Except maybe you don't need another grid
There's loads of layout containers
Like UniformGrid, StackPanel, WrapPanel, Viewbox, Canvas, and probably some others I can't remember
 
oh lord... this thing jsut gets more and more complicated
uh... yeah i might move back to winforms lol
 
WPF is way better than winforms
 
V.7
6:43 PM
@juanvan Isn't that for CodeBehind in View?
 
You can do preactically anything in wpf
 
V.7
Currently it's important to avoid any codebehind in View part of MVVM. As you might see there's a need to have method in ViewModel which is invoked via View's control
 
How I consider something thats better: Not Extremely Difficult to learn compared to the "obsolete" concept, has more features, has better compatability, etc.

Winforms versus WPF: Winforms is simple and easy to learn, while WPF is like an enigma to me, WPF Has more styling features, but doesnt always look or render correctly on build/run, and almost all the code from Winforms C# no longer works in WPF, or requires slightly more complicated methods to get them running
heck, took me a couple hours to figure out how to name an element in the XAML to reference it in the C#
 
WPF is a steep learning curve
But when you get your head around it it's pretty good
 
It just feels like im learning CSS Grids or Javascript canvas all over again
And yes, i know css grids isnt supposed to be hard, but it was for me :3
 
6:50 PM
WPF is really symptomatic of a very smart person having a lot of good ideas about how to do everything. Yeah oops, you have to know a good portion of what they did to get why they created it like that
 
Im going to take a break from WPF for the moment, ive been up for 12 hours trying to figure this thing out..
 
Again though, get in the minsdset and you can create some incredible stuff
 
maybe..
 
Hold on I'm still layout our your dodgy thing
 
oh
 
V.7
6:56 PM
The main thing is that a TextBlock with property MouseBehaviour.MouseUpCommand="{Binding MouseUpCommand}"></TextBlock> should invoke a method inside Dependency_1.cs pastecode.xyz/view/3ea03a16
 
Thats originally sortof how I wanted it to look
 
So that's what my version of your thing looks like
 
also, I used a lot of temporary gradients, but those will probably go away
 
V.7
@CaptainObvious Is it possible to prettify a little your design, Sir?
 
6:59 PM
The only thing I couldn't fix was your big textbox. You need to do newlines properly
@V.7 Go on
Even though it's @Taylor's anyway
 
I used an HTML encoded return symbol
couldnt find anyway else to do newlines
 
Oh that might explain it
That is a way of doing it. Not the best, but sufficient. It just didn't paste proeprly though
 
I also saw you could bind C#'s string \n return thing by binding the data to the text box's value
but I never got that working
 
V.7
This design reminds me
 
Look at that visual tree though
(The selected grid is the main window grid)
This is the original one.
Note that the rectangles are completely gone. I hate rectangles, they have literally no purpose IMO
 
V.7
7:04 PM
@AvnerShahar-Kashtan Hey o/, check this out youtube.com/…
 
ok..
I dont know how to put elements inside others
so I just stacked them like an HTML prototype :3
 
V.7
<el1 prop1="value_1">
     <el2 prop2="value_2"></el2>
</el1>
 
They go in eachother exactly like html
 
oh
im f-tard lol
 
Grids support backgrounds. Borders support backgrounds AND (obviously) borders, but borders can only have 1 child element
So it's fairly common in my projects to see Grids inside Borders
If I have an area that explicitly needs a border
 
V.7
7:07 PM
@CaptainObvious @TaylorS This means that you might be able to add there 1 child like a grid and then add others inside that grid
 
Exactly like I did
Even though you can have a border with a single non-layout element (like a button), I will never do it
Let me show you something
 
V.7
Although, if anyone would help with this one sendspace.com/file/fdkjwy would be very appreaciated ...
The main issue is that clicking on TextBlock does nothing like Binding to DependencyObject is not maid or smth.
 
Without knowing what it is I ain't donwloading that shit
 
V.7
Holy moly .. it's just an archive
With a sample WPF project inside
 
Jack, hmmm
 
7:11 PM
 
Fuck sake
@CaptainSquirrel pls
 
V.7
Where I should upload it or how to show the code?
Ok, the main issue is in Dialog_1.xaml and Dependency_1.cs
 
Well I might take a look in a minute
 
V.7
For example, <TextBlock Text="Click Me" FontWeight="Bold" Margin="0,0,4,0" t1:MouseBehaviour.MouseUpCommand="{Binding MouseUpCommand}"></TextBlock>
And then Dependency_1.cs has pastecode.xyz/view/3ea03a16#L1
 
Wait you're binding commands?
Uh
I don't know commands so I can't help you
This is one of my older WPF projects
 
V.7
7:15 PM
Just trying to make a MouseUp or MouseDown event invoke some method without breakign MVVM logic
 
The red lines are the column/row divides on the main window grid
The pink boxes are the second level grids
Which are themselves divided up a bit further for their contents
Note how none of the containers on the UI don't have borders, so they will jhust be grids, instead of borders>grids. This is just because of the design style I had at the time didn't really use borders
For the middle container, here's roughly how that is divided
Green is the divides, and blue is the containers within
The handy thing with laying things out like this is it will scale. I haven't set anything on the screen to a set width, only fitting it in bounds of rows and columns
@TaylorS Do you get what's going on?
 
7:39 PM
Ah well I hope so because I'm going in a minute
 
7:51 PM
Oh, sorry, was eating, but yes I think I understand now
thankyou
 
 
1 hour later…
9:04 PM
@CaptainObvious did you teach the bot hmmm?
 
 
1 hour later…
10:04 PM
Hello - does anyone help with code queries in here or is it all off-topic chat?
 
Hello. Anybody here?
 
no
 
I know this is C# chat, but didn't know where to ask about web services
I am planing to build a client application that consumes a WSDL service.
in C# and WPF for demostration purposes
Are there publicly available SOAP services that I can just fetch data from?
i mean just generate that authentication token and plug my C# application into the service and fetch data? :)
I know that Twitter is fairly easy to set up, but you need an account :)
But is Twitter SOAP service, or REST?
its important that it would be a SOAP
Or in the end, can I somehow mimic a SOAP service with some C# pre-built library? :)
 
Does anyone know much about WPF?
 
@stigzler yes i code WPF
 
10:19 PM
Well - you certainly sound leagues beyond my code monkery!
would you be willing to help out a wpf newb?
 
you must understand the binding in WPF.
if you know the MVC patter of what is consisted of
 
oh - there's loads I need to learn about WPF - but my main querie's about source files, resources and adorners
 
each field in your WPF GUI interface can be a View bound to a field inside the Model
 
here's the post I made today: stackoverflow.com/questions/58895133/…
 

« first day (3318 days earlier)      last day (1615 days later) »