« first day (742 days earlier)      last day (3407 days later) » 

1:00 AM
yeah that's not happening
 
 
8 hours later…
9:10 AM
Hey
 
 
1 hour later…
10:15 AM
hi guys
need some help in wpf
trying to bind data to my combobox like so http://pastie.org/9687370
 
guys,
anyone??
 
need help with an issue
I want to use a converter for a textblock
while I dont use the converter, the textblock is bound to a country code
which works fine
 
converter?
 
but I want to convert the code to the country name, so I created the converter
A value converter
you are getting me right??
 
10:34 AM
nope
 
you are not aware of value converters in wpf??
 
nope i guess not new to it after 1 year :)
 
okays,
 
i need hekp too
 
then I shall go to the c# room
ohh, I'll take a look to your prob
maybe I could help you ;)
 
10:37 AM
i need a form with only a circular image and on mouse hover display another form out remove it
 
@SamyS.Rathore if we use MVVM then we actually doesn't need converter anymore
 
then?
 
Data Binding to property which provide after-conversion data
public string SomeText { get; set;}
 
I get your meaning, thanks for that, but I can't change the code right now
 
public int TextCharacters
{
get { return SomeText.Count(); }
}
oh
hmm
 
10:40 AM
my prob is I'm not getting the bound value in the converter
any obvious reason that comes to mind??
 
moment. checking your code
This one?
<ComboBox x:Name="cmbitem" Height="32" FontSize="14" DisplayMemberPath="Product" SelectedValuePath="id">
                        </ComboBox>
 
No I didn't provide my code yet
just a min
       <TextBlock Text="{Binding Path=GuestCountryCode, Converter={StaticResource countryCodeToCountryNameConverter}, ConverterParameter= GuestCountryCode}"  Grid.Column="0"  />
this is my xaml code
and the converter code
   public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
    var abcd = string.Empty;
    if (value != null)
    {
        FullCheckIn.UI.Common.FullCheckInApplicationState abc = new FullCheckIn.UI.Common.FullCheckInApplicationState();
        abcd = abc.Countries.Select(c => c.CountryCode == value).ToString();
    }
    return abcd;
}
 
I'm not sure, but don't you need to Binding GuestCountryCode?
(it's been a while since I used converter, mind me)
 
{Binding Path=GuestCountryCode, this part right?? yes I tried without the Path tag also
doesn't work either, m getting a empty string in the value
I tried it like this
Text="{Binding GuestCountryCode, Converter={StaticResource countryCodeToCountryNameConverter}}"
 
Hmmm.. I got to go btw, I think you need to wait for the pros to be online (maybe 2-3 hours from now)
sorry
 
10:48 AM
okay
 
 
3 hours later…
2:11 PM
hii
 
hi
 
Hey guys
I have a listbox that uses a usercontrol as datatemplate
I want to access info from the item bound to the usercontrol to make decisions
(e.g. change a color of text when based on a property of the bound class)
How can I do this?
 
bind to selecteditem?
or are you talking you want to change something within the item itself?
 
the latter
public partial class ACListItem : UserControl
{
public static DependencyProperty Active =
DependencyProperty.Register("IsActive",
typeof(bool), typeof(ACListItem));
public ACListItem(){
InitializeComponent();

bool active = (bool)this.GetValue(Active);
var x = (AirCraft)this.DataContext;
if (!active)
{
this.Foreground = (Brush) Application.Current.Resources["KLMSilverGrey"];
this.Background = (Brush) Application.Current.Resources["KLMSilverGrey"];
}
}
}
the 'active' is always false, while this is not the case in the database
x = null
 
please use the fixed fonts button when pasting code
 
2:19 PM
how do i do that?
 public partial class ACListItem : UserControl
{
    public static DependencyProperty Active =
      DependencyProperty.Register("IsActive",
      typeof(bool), typeof(ACListItem));
    public ACListItem(){
        InitializeComponent();

        bool active = (bool)this.GetValue(Active);
       var x = (AirCraft)this.DataContext;
        if (!active)
        {
            this.Foreground = (Brush) Application.Current.Resources["KLMSilverGrey"];
            this.Background = (Brush) Application.Current.Resources["KLMSilverGrey"];
ah found it
 
:)
 
that will only get called once... during the creation of each item
 
That is no problem
since it will never change
 
is this.DataContext always null too?
 
This usercontrol is bound to an object that has an 'IsActive' property
yes
Yes, datacontext = null
 
2:24 PM
why not do that in OnDataContextChanged or something
 
shit
    <UserControl x:Name="userControl" x:Class="KLM_APU_Engineering.UserControls.ACListItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="50" d:DesignWidth="659
             " BorderThickness="0,1,0,0" BorderBrush="{DynamicResource KLMBlue}" Foreground="{DynamicResource KLMBlue}
 
hit up arrow
then control+K
 
thanks
 
delete those duplicates
 
Netscape
The function gets called
that is not the problem
 
2:25 PM
what function does?
the constructor? of course it does
 
I am trying to access a property bound to the usercontrol by a listbox
 
but the datacontext isn't bound during the construction of the object
 
You are absolutely right
I did not think of that
It works now
I could kiss you right now
But I hope a thankful nod will suffice
 
i guess...
 
2:56 PM
1
Q: Can I compile my own WPF dll's>

rodolkI found WPF source code in this link: http://referencesource.microsoft.com/#PresentationCore/src/ Can I use that source code to compile my own PresentationCore.dll? I'm trying to do this because this dll is calling a system COM Object, penIMC.dll, that has an error. My idea is to modify the co...

lol
 
I can see no problems with that :)
 
No just rewrite that in a 2 hours or so
Its easier
 
3:30 PM
@NETscape at least he got a star!
 
@Markus the problem lies within penIMC. you're better off finding out whats wrong with that rather than trying to recompile the entire source code and put it in your project
not to mention he will need to check licensing
and additionally he can't install it over MS's library.
 
licensing? haven't ms always been very much pro copyleft and all those free and open licenses?
 
there has to be some kind of agreements.
 
just kidding...
 
if the problem is found in one line of code or whatever, rewrite it, or use pinvoke, or do something else other than trying to recompile a system library.
theres a reason they took down dotnetinside.com
 
3:34 PM
Bye guys
thanks netscape!
 
they posted the source before referencesource was released
 
so is .net open source now?
 
not really
its source is just disclosed now.
I don't believe you can contribute to the source, you can only look at it. Some part of the framework are still hidden. like things in System.Printing namespace which I would love to look at.
 
Ok, well have a nice weekend yall
 
4:41 PM
Hey all. Some of you know I've been working on a custom control. Well, I'm having an issue with a Grid. BTW, this is all done in code. There is no XAML. I create my Grid and set the top (0) row's height to Auto. However, the row does not appear to expand when the child in that row expands. Am I missing a setting?
 
are you explicitly setting the child control's "Grid.Row" property?
 
yes
Grid.SetRow(_childControl, 0);
 
might need to do a layout pass
 
like some type of refresh after the child control is done being createD?
 
looking for my code
 
4:52 PM
tnx
 
ep.Measure(_printableAreaSize);
ep.Arrange(new Rect(new Point(), _printableAreaSize));
ep.UpdateLayout();
that's what I do to force a layout on a control that doesn't get drawn on the UI
maybe do that, then set the grid.row
@BrandenBoucher do you also grid.Children.Add(_childControl)?
 
gotcha
ya
I do the add.
I should have been more complete
The grid has 3 rows and 3 cols
I fill the 0,0 cell and that causes the top row to have some height (lets say 20). But when I fill the 0,1 cell (row 0, col 1), and that child has a height of 80, the top row does not expand to accomidate.
accommodate
so I may have to do just as you suggested.
Oh. hahaha. I'm a dumb ass. I think I know exactly why it isn't expanding.
To be more specific the setup is like this Grid(0,1) <- Canvas <- StackPanel <- InnerControls[]
Well, the Canvas's height isn't increasing...
See, this is why I need more sleep. For the past few days, I couldn't figure it out. I slept in today and, BAM, figured it out.
 
5:08 PM
hahaha
 

« first day (742 days earlier)      last day (3407 days later) »