Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

MIHAI_MTZ

@MIHAI_MTZ
About
Posts
57
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ServiceSecurityContext.Current is null
    M MIHAI_MTZ

    I have a WCF workflow service application. The service is defined as follows:

    and the binding configuration is:

    Now if I run this in IIS Express everything works fine... In IIS however ServiceSecurityContext.Current is null. Does anybody have any idea?

    WCF and WF wcf workspace csharp wpf windows-admin

  • Binding cells in ListView
    M MIHAI_MTZ

    Like this:

    <Window x:Class="SDKSample.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Window.Resources>
    
    <XmlDataProvider x:Key="MyData" XPath="/Info">
    	<x:XData>
    		<Info xmlns="">
    			<AccessEvents Name="A" Text="Hello"/>
    			<AccessEvents Name="B" Text="Hi" />
    			<AccessEvents Name="C" Text="Bye" />
    		</Info>
    	</x:XData>
    </XmlDataProvider>
    
    <DataTemplate x:Key="SecondCell">
    	<CheckBox IsChecked="{Binding Path=IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}" Content ="{Binding XPath=@Text}"/>
    </DataTemplate>
    
    </Window.Resources>
    
    <ListView ItemsSource="{Binding Source={StaticResource MyData}, XPath=AccessEvents}" >
    	<ListView.View>
    		<GridView>
    			<GridViewColumn Header="Access Event" DisplayMemberBinding="{Binding XPath=@Name}" Width="150"/>
    			<GridViewColumn Header="Deliver" CellTemplate="{StaticResource SecondCell}" Width="80"/>
    		</GridView>
    	</ListView.View>
    </ListView>
    </Window>
    
    WCF and WF wpf database wcf com xml

  • Binding cells in ListView
    M MIHAI_MTZ

    First you need to think if you really need to do this. It seems a bit odd what you want. One way to do it, is using a template selector (DataTemplateSelector to be more precise). With this thing you can create several templates and, based on some properties of the object you are binding to (in this case "Name"), select one of them. Of course this only works if you only have a few templates... Here's a nice example: http://www.beacosta.com/blog/?p=16[^] Mihai,

    WCF and WF wpf database wcf com xml

  • Retrieve content of a Cell in WPF Grid
    M MIHAI_MTZ

    It's nothing wrong with what you did. I'd still use the Tag property because it can handle any object and not just strings and because you never know when you might need the tooltip property for a real tooltip.

    WPF csharp css wpf tutorial question

  • drag and drop question
    M MIHAI_MTZ

    The simplest solution is to start the dragdrop with this line "DragDrop.DoDragDrop(tvi, dragContext.Description, DragDropEffects.Copy);" I assume that Description is a string. You can than just forget about the other two events. The textbox already knows how to handle the dragover and dragdrop events with strings. This is what is causing the behaviour. The textbox already has a command binding for the paste command which handles the two events and marks them as handled. If you want to drag drop other things than string, you'll have to handle the events before textbox does, and to mark them as hadled so it can't override your settings:

    TextBox AllowDrop="True" Drop="TextBlock_Drop" PreviewDragOver="TextBlox_DragOver" PreviewDragEnter="TextBlox_DragOver"
    

    private void TextBlox_DragOver(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(Button))) { e.Effects = DragDropEffects.Copy; } else { e.Effects = DragDropEffects.None; } e.Handled = true; }

    WPF csharp question visual-studio wpf help

  • Retrieve content of a Cell in WPF Grid
    M MIHAI_MTZ

    What you are doing is quite strange ... it's not a good idea to keep important data in the tooltip property.

    private UIElement getElement(int column, int row)
            {
                foreach (UIElement e in MyGrid.Children)
                    if (Grid.GetColumn(e) == column)
                        if (Grid.GetRow(e) == row)
                            return e;
    
                return null;
            }
    

    You will have to cast the UIElement to textblock to get the tooltip.

    WPF csharp css wpf tutorial question

  • ScrollBar Enable?
    M MIHAI_MTZ
    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <TextBlock Text="" Width="Auto" Height="Auto" TextAlignment="Left" TextWrapping="Wrap"/>
    </ScrollViewer>
    
    WCF and WF question

  • ScrollBar Enable?
    M MIHAI_MTZ

    Not exactly what you want, but you can achieve the same effect by placing the textblock in a scrollviewer and letting it strecth as much as it needs to. Mihai,

    WCF and WF question

  • Is there similar properity like Anchor Properity in WPF?
    M MIHAI_MTZ

    For objects that are placed inside a grid a combination of HorizontalAlignment, VerticalAlignment and Margin can be used to control the position in a similar way to "Anhor". Anchor right & bottom <=> HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin=",,," Anchor left & right <=> HorizontalAlignment="Stretch". As I said the controls must be placed inside a grid; Mihai,

    WPF csharp wpf question

  • WPF Hierarchical Data Templates are killing me
    M MIHAI_MTZ

    what happens if you try this: DataType="{x:Type local:NonDataNode}" instead of DataType="local:NonDataNode" ? Mihai,

    WPF wpf help csharp html data-structures

  • DataTemplate
    M MIHAI_MTZ

    That's it; Thanks.

    WCF and WF css wpf wcf question

  • Dockpane Collapse/Expand
    M MIHAI_MTZ

    This sounds like the expander contol.

    WCF and WF css question

  • DataTemplate
    M MIHAI_MTZ

    I've got this datatemplate for a listbox or combobox. How can I make the red grid be as large as the item; at the moment it shrinks down to the size of the textblock.<DataTemplate x:key="DataTemplate2"> <Grid Background="#FFFF0000" > <TextBlock Text="{Binding}" /> </Grid> </DataTemplate>

    WCF and WF css wpf wcf question

  • How to find a particular entity in the listview and color it
    M MIHAI_MTZ

    You could try binding the background brush to the textbox and use a custom converter that receives as a parameter the string from the cell. Mihai,

    WPF help tutorial question

  • Add Singleton UserControl in WPF
    M MIHAI_MTZ

    I'm quite sure that is impossible. Anyway, a singleton control sounds like a very bad idea. First of all why would you need such a thing? Seccondly, how would you expect it to work when you add a seccond "instance" of the control? I'm asking this because a control can only have one parent, so it can't be in to places at once. On the other side, if you want to make sure that the control is only used once, you could keep track of the number of instances created in a static variable, and throw an error when another instance has already been created. Mihai,

    WPF wpf csharp question

  • Dataset generation bug
    M MIHAI_MTZ

    Is anybody aware of a bug (and a fix) in VS 2005 SP1 that generates errors in datasets when adding an insert/update/delete query. The error is "reference is not set to an instance of an object" (usually line 1) and is generated because the "Name" attribute is not saved in the xml file. Sometimes, simply loading the dataset in Visual Studio, and saving it clears all the "Name" attributes in the xml; and this has happened on multiple computers. Mihai,

    C# help visual-studio csharp database xml

  • How to bind data to a dropdown using Active Directory
    M MIHAI_MTZ

    It's not binding but here it goes: You should replace these lines with the proper values entry.Path = "GC://****"; entry.Username = txtUN.Text; entry.Password = txtPW.Text; DirectoryEntry entry = new DirectoryEntry(); entry.Path = "GC://****"; entry.Username = txtUN.Text; entry.Password = txtPW.Text; DirectorySearcher ds = new DirectorySearcher(entry); ds.Filter = txtQuery.Text; ds.CacheResults = false; ds.SearchScope = SearchScope.Subtree; foreach (string s in cols) ds.PropertiesToLoad.Add(s); src = ds.FindAll(); cbResults.Items.Clear(); for (int i = 0; i < src.Count; i++) { if (src[i].GetDirectoryEntry().Properties["mail"].Value != null) cbResults.Items.Add(src[i].GetDirectoryEntry().Properties["mail"].Value); else cbResults.Items.Add(i); } private string[] cols = { "displayName", "givenName", "sn", "ou", "employeeType", "mail", "telephoneNumber", "samAccountNumber", "whenCreated", "whenChanged", "objectGUID", "c", "objectCategory", "anr", "otherTelephone", "cn", "badPwdCount", "lockoutTime", "pwdLastSet", "lastLogon", "mobile", "Profile", "LastLogin", "MaxStorage", "PasswordAge", "Description", };

    ASP.NET windows-admin help tutorial

  • Problem about debuging
    M MIHAI_MTZ

    You didn't mention adding the project dependencies (right click main project/Add reference/ Choose VC project). You should now be able to step into unmanaged code. However, there are lots of strange behaviours (like functions which completly ignore return statements and so on) when debugging managed and unmanaged code in the same time.

    C# debugging help tutorial question

  • wpf listbox [modified]
    M MIHAI_MTZ

    Not exactly sure this is the right messaeg board for this question... How can I hide the blue selection background on a wpf listbox? -- modified at 3:48 Thursday 21st June, 2007

    C# question csharp wpf

  • Drag and Drop
    M MIHAI_MTZ

    I need to implement drag and drop with some files between a database and the desktop. The problem is that when dragging from the server to the desktop I don't have an actual file to set the data object. I'm looking for something like "delayed rendering" or something else which would allow me to download the file after the user dropped it. Mihai,

    C# database sysadmin help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups