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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

stofel

@stofel
About
Posts
7
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • i need to install visual studio in linux
    S stofel

    Please have a lokk at Visual Studio Code[^]. There is a version for Linux, but I haven't installed or tested it

    Linux, Apache, MySQL, PHP csharp visual-studio linux

  • i need to install visual studio in linux
    S stofel

    Hi, in my opinion you have no chance to install full visual sudio. Even codeweaver is not able to install it (Visual Studio 2012 | What Runs | CodeWeavers[^] Maybe you could run "Visual Studio code", if it is enough for you.

    Linux, Apache, MySQL, PHP csharp visual-studio linux

  • Cannot find governing FrameworkElement or FrameworkContentElement
    S stofel

    Hi, I'm a newbie in wpf and I have a problem with the binding. I have a class inherited from FramworkElement and there is a Collection. The Items of this collection are inherited from DependencyObject. On the Form is only one TextBox. I want that the text, which is typed by the user will be copied into the first Item of the collection. Here some code

    public class Item: DependencyObject
    {
    public string Name { get; set; }

          public virtual object Value {
            get { return GetValue(ValueProperty); }
            set { SetValue(ValueProperty, value); }
        }
    
        #region DependenvyProperty
          public static readonly DependencyProperty ValueProperty =
              DependencyProperty.Register("Value", typeof(object), typeof(Item));
        #endregion
    
    }
    
    public class ItemContainer : FrameworkElement
    {
       
        private List<Item> \_itemlist = new List<Item>();
    
        public List<Item> ItemList
        {
            get { return \_itemlist; }
        }
    }
    

    and the form:

    Window x:Class="WpfApplication2.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="417" Width="589" xmlns:my="clr-namespace:WpfApplication2">
    <Grid>
    <my:ItemContainer Height="18" HorizontalAlignment="Left" Margin="-168,0,0,33" x:Name="itemContainer1" VerticalAlignment="Bottom" Width="18">
    my:ItemContainer.ItemList
    <my:Item Name="Item1" Value="{Binding ElementName=txtItem1, Path=Text}" />
    <my:Item Name="Item2" />
    </my:ItemContainer.ItemList>
    </my:ItemContainer>
    <Canvas Margin="16,18,8,6" Name="canvas1">
    <TextBox Canvas.Left="88" Canvas.Top="15" Height="23" Name="txtitem1" Width="89" />
    <Label Canvas.Left="14" Canvas.Top="16" Height="22" Name="label1" Width="58">Item1
    </Label>
    </Canvas>
    </Grid>
    </Window>

    At runtime the program displays the error2 Cannot find governing FrameworkElement or FrameworkContentElement. I don't want to inherit item from FrameworkelElement because in the real project the class Item is inherited from another class. What can I do to transfer the text from the textbox to the first item of the collection ? Thanks in Advance

    WPF wpf csharp css dotnet wcf

  • Strange problem with GetSchemaTable and utf8
    S stofel

    Hi, I have a problem with an oracle DB which is installed with an utf8-characterset. I build a form in VS2005 where the user type in a SQL-selectstatement and the form executes it and displays the result. Everything works fine with a singlebytecharcterset. For example:

    String sqltext = "Select artext from tbl_ar"; // artext is
    // varchar2(30 char)
    DataTable schTable;
    OracleDataReader rdr = null;

    OracleCommand cmd = new OracleCommand (sqltext, OracleConnection, OracleTransaction);
    rdr = cmd.ExecuteReader(CommandBehavior.KeyInfo);
    schTable = rdr.GetSchemaTable(); // Here the DataTable is filled with the
    // information of the columns
    DataRow fldDescr = schTable.Rows[0];
    int len = (int) fldDescr[2]; // 2 = ColumnSize

    In the database with the utf8-characterset the variable len hat the value 0f 90 instead of 30. Is there a way to get the correct result ? Thanks in advanced Stofel

    C# database oracle help tutorial question

  • How can i set shortcut of a Button press event?
    S stofel

    Hi, as far as I know, you have to program i manualy. So build up a list of buttons and the combination of keypresses, theu should react on. And look at ProcessCmdKey in your form, figure out, whicht key is pressed on the form and fire the right button.PerformClick(). Happy coding Willibert

    C# question help

  • Problem with GetSchemaTable
    S stofel

    Hi, Select * from (select name from employee) is a legal statement, OracleClient and Toad could execute it. I could by-pass it, I change OracleDataReader rdr = cmd.ExecuteReader(CommandBehavior.KeyInfo); into OracleDataReader rdr = cmd.ExecuteReader(CommandBehavior.SchemaOnly); But their I don't get the basistablename even in a normal select. Tanks Willibert

    Database question database help

  • Problem with GetSchemaTable
    S stofel

    Hi, I have a problem with a sql-Statement. I’m developing an application in which a user can type in a sql-statement, e.g. "Select * from (select name from employee)" . This statement is not very reasonable but it is syntactically correct. My code is OracleCommand cmd = new OracleCommand("Select * from (select name from employee)", myOracleConnection); OracleDataReader rdr = cmd.ExecuteReader(CommandBehavior.KeyInfo); System.Data.DataTable colinfo = rdr.GetSchemaTable(); At this staement the application crashed with an exception: "InvalidOperationException: Identifier expected or identifier in quotes expected" . (The message is in germaan: "Syntaxfehler: Erwartet wird ein Bezeichner bzw. Bezeichner in Anführungszeichen.", but i try to tranlate it in english) I want to use GetSchemaTable to get all the columninformation I needed to display the result. So how can I solve the problem ? Thanks in advances Willibert

    Database question database 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