« first day (1584 days earlier)      last day (3588 days later) » 

01:02
@BradleyDotNET, it must be still Sunday where you live but if you're around and not interrupting I would like to ask a UI related question. quite generic and the whole idea type of question I'd say
 
3 hours later…
04:00
Hi @Mehrad
04:33
@BradleyDotNET Hi :)
thanks for coming around
No problem
It is Sunday, but I'm still coding :)
hahaha... That's the way to go
or they would call us Normal
;P
Brad, I was in this level which I need to put a little Settings page in my application
However, before I go deep into implementing it I asked around couple of people to see what they think
Upon firing up the application I read a list of available platforms from our database and I need to give the use the ability to choose which ones s/he wants to be still valid in the application.
type of Checkbox group
However the number of available DBs vary so I can't stick with the solid number of checkboxes.
04:38
I wanted to know if there are alternatives rather than going with the Listbox which has checkboxes in it
Which display tech are you using?
cuz I remember ones in a blue moon I did it like that I it looked really ugly
WPF
however, I didn't know how to use templates that time
Any ItemsControl would work then
ListView is probably the way to go
You can style the check boxes if you don't like that aspect of the appearance
aha
So I guess I can go with a ListView, put some check boxes in it, remove the headers and all using styling
yeah
and standard ListView doesn't have headers IIRC
04:41
I am quite comfortable using ListView and I just learned how to combine Datatemplates and Styles with it.
Thats great. Data templates are really important in WPF
Is that ListBox that have headers? or even not. That's good for me anyways.
I don't think either has headers
If you put a GridView under the ListView you get headers
Thanks. Now I can sit down and smash it. I was kinda dragging it for couple of days to make sure that's the best solution
@BradleyDotNET that's right. Now I remember
Yeah, ItemsControl (or a derivation) is the way to go for any collection in WPF
04:45
also not sure if you've heard of Robby Ingebretsen but recently when i was watching one of his Microsoft video's about Kaxaml he mentioned this Video that later on when I watched it, I ended up really liking it.
@BradleyDotNET great
Thanks for popping in @BradleyDotNET
no problem
Hey
Hey @Proton
Bradley still there?
Yeah, I'm still around
05:01
@Proton I'm still around if you had a question
@Feeds Bahahaha... fantastic
Is it a good idea to limit login attempts? How would you do it. With an extra table?
@BradleyDotNET would you use ListCollectionView for the binding of a ListView which overall it might have 3 to 5 members max and sorting or filtering isn't required?
@Mehrad That seems a bit overkill
05:08
@BradleyDotNET ObservableCollection ?
If its going to change at runtime
@Proton Is it a good idea? Usually
@Proton I am def. not an expert in this but i would since it stops people from trying to play the guessing game. and How! I wouldn't know. Maybe a counter.
helps prevent against rainbow table attacks
but you still need a lot of other security
I'm not a crypto "expert" either, though I've done some
An extra table could certainly work
@BradleyDotNET Not at all. It's going to be read using a static class upon loading the application in its Model
you can get away with List then
OC won't hurt you of course
but you don't technically need it unless the collection changes after being bound
05:12
morning
If i just would use a counter in the applicationit would be too easy to trick it.
@BradleyDotNET I am not sure why I wasn't thinking that way. a simple IList bound to ListViews DataSource. Am I right?
@BenjaminDiele morning
@Mehrad ItemsSource but yeah
@Proton How so?
Is this a web app?
If its desktop then it doesn't really matter :)
@BradleyDotNET correct
05:29
If the User would restart the counter would be reseted? Isn't that bad?
It's a desktop application.
You are a lot more vulnerable in a desktop app anyways
@Proton So limiting the login tries buys you very little
Unless its against a central server of course
05:54
So you would just count the login attempts in the app? No Table?
It doesn't really matter if the user would be reseted to 0?
Not really
Besides, you'd need a reset mechanism anyways
Errr. .. i mean the counter.
Not user. ;)
right
You have to figure out what you are defending against
With a desktop app, its a bad person actually sitting at the persons desk guessing passwords
In a really bad situation, they wrote a program to type data into your form
Are either of those realistic threats?
And if so, how do you restore login privliges for a legitimate locked-out user
I would not lock the user forever just for n minutes.
Then someone restarting the machine isn't really a problem
assuming n is not large
go ahead and put it in the DB if you want
thats better protection, but again, what are your real threats
06:07
real threats? If someone without login privileges could login and modify or change the data.
or also would create a Lot of fake Data
not what I mean
how is someone going to attack your login system?
In a desktop app, their options are very limited compared to a web app/service
i guess by trying to find out the Server ip or someone's login data?
Lets put it this way
If they steal the physical computer, and have infinite time to try stuff, your login rate-limiter will just slow them down
If they are at your location, its a bit more useful, but as far as it being a huge security feature, its probably not as important as you think
And that answer still isn't an attack vector :)
@BradleyDotNET, I am trying to connect my Preferences window's view to it's ViewModel using the following DataTemplate however, not even it doesn't do the trick and instantiate the ViewModel but also it's giving me the warning about "Can't put a window in the Style".
  <DataTemplate DataType="{x:Type vm:PricelistSettingsViewModel}">
    <vw:PricelistSettingsView />
  </DataTemplate>
am I doing something wrong here.
No break point get's hit in the ViewModel's constructor
That won't instantiate a view model
You are just saying to use that template if the bound data item is of that view model type
06:18
? I thought using a DataTemplate is one of the ways to connect the View to ViewModel
It is... kind of... but not like that
emmm... then I guess I haven't understood it wrong
A data template says how to display a individual instance of an object
nearly always in the context of an ItemsControl
So if you have a List<Person>, it describes how to display an individual person
@BradleyDotNET I have always worked with UserControls rather than Windows. This first time seems to be odd.
The DataType allows you to display different types differently in a polymorphic or CompositeCollection situation
You had to have a root window somewhere ;)
06:23
The snippet I mentioned above is in my MainWindowResources.xaml
and I can fire up my new Preferences window using something like
        var pricelistSettingsView = new PricelistSettingsView();
        _openPrefernces = new RelayCommand(
            param => pricelistSettingsView.Show()
            );
and i thought that DataTemplate is the missing link
Probably not
DataTemplate only makes sense in an ItemsControl
so unless that was set to the ItemTemplate property of your ListView, you were doing it wrong :)
technically you can use it in ContentControl as well (or ContentPresenter I can never remember which
but thats pretty rare
emm... I guess I have confused some stuff
looks like it :(
:)
So in this case, considering that I have a View which is firing and a ViewModel which is sitting down there doing nothing. How can I link these two to eachother.
Somebody has to instantiate the view model and give it to the view
06:27
I mean don't take me wrong. I tried reading about it before I ask this. but seems I was under a totally wrong impression
the view itself can do it of course
this one that you mentioned was the first option in one of the answers.
Reed mentioned it
13
A: How does a View know what ViewModel to use in WPF?

Reed CopseyThere are various options here. Something has to set the View's DataContext to be an instance of the ViewModel. There are lots of options here: This can be done directly in xaml (the View just instances the ViewModel directly). This can be done in the View's constructor (this.DataContext = ...

If that's the right was of doing it, I'll do it like that
Yeah, he mentions the DataTemplate as well
though I suspect he means in the context of an ItemsControl
This is going to be my 2nd MVVM application so I need to learn some variations
or similar
06:29
I would say so
yeah, thats always good :)
I usually do it in XAML or in the View constructor
cuz the moment I seen that, I said, Ah, I have done that before. let's do it like that
which are really basically the same thing :)
Reed didn't mention the syntax. Would you be able to give me hint on how to do it in Xaml please
I don't have a code behind for the View so I'll go with the XAML
sure:
<MyView.DataContext>
     <viewModels:MyViewModel/>
</MyView.DataContext>
viewModels is an xmlns declared namespace of course
06:32
Yep. I familiarized myself with them in the past the hard way :)
bet you didn't forget though :)
:) and also, does this goes in the Preferences Window's view or the MainWindowView?
Presumably the Preferences view
you are setting the data context for that view
true
it ended up being like
  <Window.Resources>

    <vw:PricelistSettingsView.DataContext>
      <vm:PricelistSettingsViewModel/>
    </vw:PricelistSettingsView.DataContext>

  </Window.Resources>
couple of error, but I guess I might be able to figure it out
Thats pretty weird looking
actually thats really weird looking
06:40
Oh... did I do it wrong?
I'm not sure its wrong, just really odd
damn
Normally you would just set that in the view itself
You mean not in it's resources?
not usually
06:41
Oh
In fact, almost never.
if not never
So the only weird part was that I put it in the Resources rather?
cuz the way you said really looked like I have done the whole thing wrong :)
and it seems I did
the resources
and that it was in the root window
instead of the actual view
emmm... can't be the whole Window be my view?
cuz this is a little Window I need to open to show the preferences
sure, but in theory your views are self-contained
06:45
I guess I have done something fundamentally wrong over here. maybe I should read a little bit more about how to fireup a second window in MVVM
not directly dependent on the containing window
To implement this, what I did was to Add a new class of a type Window to my View's folder in my project and called it say MySettingsView
That was probably a mistake
In general you only have one window
but if its a dialog, it shouldn't hurt you
So the only Window should be my MainWindow
what would the type of a second window that I might need to open up. Like this settings window
Dialogs are tricky in MVVM anyways, though for different reasons that you seem to be hitting
Just a UserControl will do
06:49
Oh
I have used UserControls all the way so far with MVVM. but I didn't intend to open a new little window but to add them to my TabView
Yeah, they are pretty flexible
but either way, it looked like you were setting your view's data context from another view
thats the biggest issue, not the UserControl/Window question
hah... lucky I did that silly mistake and shown you the Window.Resources or I would never know about it
like I said, a Window shouldn't hurt you in that scenario, but you certainly don't need one
At least, I haven't found an important difference yet :)
@BradleyDotNET Now I know what were you talking about. Cuz I guess you ween the Window and you've assumed this can't be the View he is talking about so it's somewhere else
06:52
I certainly like to stick to the right practice
phew ...
this was an amazing learning sesh
I will scrap it off and use a UserControl instead
lol, an old SO answer says to use a Window
pretty sure thats not true anymore...
it is from 09
but it can't be that bad :)
33
Q: How do you display a custom UserControl as a dialog?

Taylor LeeseHow do you display a custom UserControl as a dialog in C#/WPF (.NET 3.5)?

2009? I whole new F# is invented from since :)
Well, if for some reason I've lost my mind tonight, rest assured that the Window version should work
just don't set your DataContext in the resources :)
hahaha... sure
Working so hard not to put it in the Resources
However, UserControl doesn't have a Show the same is the Window does
Huh, scratches head to remember...
Its been a while, I'm pretty sure I did it with a UC
You can always do it with a window and see how it goes
There is really relatively small difference
anyways, time for bed
talk to you tomorrow!
07:03
Thanks @BradleyDotNET
I will give it a go and let you know how it goes
night
07:18
Morning all
@scheien yo!
08:21
hello
hello hello
anyone used worker roles in c#
on the web?
I hate monday morning.
2
@RoelvanUden Join the club!
08:42
@RoelvanUden: What do you consider the best method to tie a controller to an directive? Outside and passing data through attributes (scope {}), or wrapping it inside the directive using controller attribute?
08:55
Argh! Everytime I see code written in norwegian, or any other language then english I get a bit angry.
I think that's a healthy reaction. All code should be in english, imho
var dessert = new List<MenuRowModel>
{
new MenuRowModel{ Name = "Klassisk panna cotta med bringebærcoulis", Price = null },
new MenuRowModel{ Name = "Klassisk cremè brûlee", Price = null },
new MenuRowModel{ Name = "Tiramisu", Price = null },
new MenuRowModel{ Name = "Sjokolademousse med bær", Price = null }
};
and when I encounter this in a view, I want to kill someone!
Yeah, I'd kill for a Tiramisu as well.
I guess it's to hard to make a viewmodel and put some stuff into it.
The dev probably wanted to do a Model-View excluding the controllers.
Reminds me of my first job, in PHP. Queries in the page everywhere. Nowhere a view/controller/model to be seen. Everything in 1 php file per page. That job sucked :D
09:05
@BenjaminDiele Bit like, when I started using Classic ASP
Never talk down on a job, someone might be watching :)
@scheien The people who use SO don't work there anymore. The people working there are .. less inclined to use SO.
It's not about who works there, but rather who's your next boss!
@Tommo1977 Yeah, but for someone fresh out of school, I can sorta understand you don't know what ways are good to structure your code.
@scheien The colleagues and job content where fine and fun though. Just the technical implementation was a bit off :D
I've seen dirty hacky code many times, it's not a pretty sight :/
turning poc code straight into production without any modification/restructuring etc
09:09
I even had a colleague that didn't believe in json_encode. Instead he manually made his json in php by concatenating strings.
And then I had a colleague that wrote some unit tests. 3 tests for a codebase of 2 years old, the only tests there. And all of them used the production API to test the creation and deletion of companies...
Very clever
@scheien Uh. What? Controlled to a directive?
in an angular directive, you can reference a controller.
or you can assign data from scope: {}
@BenjaminDiele Well, creating a huge mess in one file is not inherent to PHP; it's inherent to sucky coders. :-P
@scheien I never reference a controller from a directive; didn't know you could!
(But it seems like a bad idea)
That's what I though, but could be nice if you want to lock down a directive.
09:18
@RoelvanUden Yeah, it was just because most of my experience is in PHP
@All : Anyone had used stringbuilder?
I think everyone has used a stringbuilder in here yeah
@RenjithJR: Ask your question. :)
I have to get the contentplaceholder's content from the child in masterpage's stringbuilder
I have to build a stringbuilder with the entire html page and not of the masterpage aqlone.
What?
09:27
I have to create a stringbuilder, which should contain the entire html page including both master and child.To do so,how can i access the child's stringbuilder in masterpage?
Sound weird. :p
I guess you could have a property/field in your masterpage codebehind
and assign the child to that
then have a property/method which return the stringbuilder
I tend to just bind directives on something like a property, or scope
That's what I went for.
quick question
Is career as a salesforce developer worth it?
I have written a method in child,which returns a htmlstring.
09:37
Never heard of salesforce, so I dunno.
I am a .net developer and I got a really good offer to work with a good company
i fear to get type casted
"public HtmlString theHtmlContent()""
anyone here that has an insight on this?
It's like a base, which you then form into the specs the customer have?
@SamyS.Rathore That job title sounds perfect to explore the concept of "How to bring your dev to suicidal tendencies in 10 days". It sounds even worse than SharePoint dev, and that's quite a prestation!
09:46
o/
o/
What language/technology is Salesforce? Is it it's own platform?
I thought it was a java-based thing
I know other "platforms" like that which have their own specialist internal language
I got a Sharepoint offer; turned that one down very quickly.
TBH SharePoint 2013 isn't so bad, and the pay can be pretty good.
It does OData REST services now. You can actually put an Angular front end on it :D
09:56
Apparently they like everything.
Yeesh.
@Squiggle: For the 2013 yes, but then the occasional pre SP 2013 work would suck like hell :(
Or your dinosaur manager goes like "No, we always did it that way. Do it like that"
True.
But even though I'm doing Angular and WebAPI for most of my work, I still have to maintain legacy VB apps...
the curse of a business apps developer
That's true, but I don't want to mix-in other known-to-be-a-hassle tech when I can avoid it :)
10:02
@RoelvanUden Lolol
The image I have in my head for dinosaur manager is fun.
I once talked to a guy who couldn't understand why people wanted to use C# and .net. It was so slow compared to VB6.
The same guy said that websites are slow, and that web services is stupid. We don't want to have that as a web application, because they're too slow.
Shiiit, the US imprisons an Estonian because he worked on megaupload: justice.gov/opa/pr/…
Lol fuck off america.
I wonder how much money the guy saved by pleading guilty
@scheien Idiots are everywhere apparently. :-D
@scheien Oh look, a moron!
"No, please don't make websites! I'll have to learn stuff!"
10:12
@RoelvanUden: Indeed. I was speechless, did not know how to respond to that. A facepalm had been the appropriate response though
There's a senior here who keeps telling me that web forms is the superior web technology :/
Every time he says it I wanna punch him
"Yeah but web forms comes with prebuilt controls that you can drag and drop, MVC has none of that stuff."
AND
Use nuget!
@Sippy I think that boils down to exactly this:
7 mins ago, by Sippy
"No, please don't make websites! I'll have to learn stuff!"
Hah
Yeah
He taught me to use generic repo when I started coding MVC as well :3
@scheien Indeed.. that is just crazy talk right there.
@Sippy Ouch.
I have since become a padawan of the C# room.
10:19
While we're on the subject of writing good C# code, is there a book or site that shows some idiomatic ways to tackle problems? I'm writing a C# program on my own, but I fear that I'm making quite some mistakes.
Are you new at C#?
profesionally yeah
If I can remember wtf it was called I knew a good one
10:35
C♡ ?
...
i was searching for c# and could not find it
^lol
I don't think the book was called that :D
@BenjaminDiele Oh
Sorry I gave up
10:36
@Sippy You let me down :(
It's something about 99 problems you can solve with C# or something
why it got changed to C♡?
But it's based on logical solving using c#
Rather than like .. teaching you what a C# keyword does and expecting you to just know how to apply it
@Sajeetharan Valentines.
I thought it was quite witty
10:37
oh ok. then should not it be C♡visualstudio
......
@Sippy I found this but that's in scala: aperiodic.net/phil/scala/s-99
It's a little more friendly than that xD
Guys is there any function of Entity Framework that will enable you to parse your database into XML?
Morning all! I'm working with WPF ComboBox and for some reason MyComboBox.ItemsSource count is 10 but MyComboBox.Items.Count is 0. I'm not understanding why. is some one here saw like this ?
which one is the right statement ?
10:48
I'm watching MyComboBox.ItemsSource count on Watch(VS)
does the items getting displayed?
I think MyComboBox.ItemsSource and MyComboBox.Items should be the same?
nope
Items is not displaying
could you post the itemssource screen shot
sure
give me 1 mins
11:02
@Sajeetharan sorry how can I add immage to chat
using upload button
@Jamaxack follow mvvm
is it a wpf/silverlight app?
@Jamaxack Guessing you didn't bind your data source anywhere
11:30
hey all
I have one issue
can anyone tell me [Cache(Duration = 2, AspectPriority = 2)] can this cause session issue
am getting conflict
with user accounts at two different machine
11:44
@Jamaxack: Items will not be available if you have a databound source. (iirc)
11:54
@Sippy I bind from xaml
@scheien When it will be avalable?
If you add items manually
@Jamaxack after initializecomponent is called
ItemSource is for databound elements, and Items are when you add manually
Oh
til
^ that too
11:55
I should look into WPF at some point
look into MVVM first haha
I know mvvm
Just never used WPF before :P
i stuck at Simple MVVM toolkit installation. is it mandatory to implement MVVM feature in WPF application?
Well I get to spend this week reading I guess
Gotta parse a database to xml
Never parsed anything to xml
Not even 100% on what xml even looks like.
@Nimesh its not a feature. and its not mandatory. but highly recommended and much easier to maintain

« first day (1584 days earlier)      last day (3588 days later) »