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
J

johnsontroye

@johnsontroye
About
Posts
16
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WPF Datagrid: change image source on row clicked
    J johnsontroye

    I have a datagrid with a DataGridTemplateColumn. The DataTemplate is a Image wrapped by a Button. <wpftoolkit:DataGridTemplateColumn Header="Search Type" IsReadOnly="True" > wpftoolkit:DataGridTemplateColumn.CellTemplate <DataTemplate> <Button x:Name="btn" Width="25" Height="25" > <Image x:Name="icoDisplay" Source="../Resources/plus.png"></Image> </Button> </DataTemplate> </wpftoolkit:DataGridTemplateColumn.CellTemplate> </wpftoolkit:DataGridTemplateColumn> I'm trying to change the image source when a row is selected. I want to show an image with a "+" when the details for a row are not showing. I want to show an image with a "-" when the details for a row are showing. I want to change the image source when the row is selected in any cell of the row, not just when the button/image are selected. I don't have to have the button there if it can be done without it. Any help with this would be greatly appreciated.

    Troy Johnson www.anothercodesite.com/blog

    WPF

  • Silverlight & Search Engines
    J johnsontroye

    Search engines cannot parse text that is within the silverlight app (.xap). There are a couple ideas floating out there to help with seo and silverlight however, I don't know how effective they are. One ideas is to dynamically generate text into the tags that render the silverlight. The idea behind this is that if "something" in this case a search engine cannot render silverlight, it will go after what ever is in the object tags. Just to be more clear, this is not a search engine thing, it's a silverlight thing. If a browser that did not have silverlight installed, it also would see what you had between the object tags.

    Troy Johnson www.anothercodesite.com/blog

    WPF database help question

  • Using an xbap as a component on an aspx page
    J johnsontroye

    You can check out my post at http://www.anothercodesite.com/Blog/post/2008/12/31/Configurable-Silverlight-Image-Rotator.aspx[^] it may be of some help for you.

    Troy Johnson www.anothercodesite.com/blog

    WPF com question

  • The format string which put into textbox
    J johnsontroye

    You may want to look into using Converters. Do a msdn search on IValueConvert and you should find examples.

    Troy Johnson www.anothercodesite.com/blog

    WPF help tutorial

  • Could not able to open asp.net website application
    J johnsontroye

    I think the most common thing is this. Someone creates a website within visual studio and so the security on the directory is handled for you. Then you move the directory to someother location for deployment and it doesn't work. Typically this is because the service that is running doesn't have proper access to the new directory. However, it would be more helpful if you shut of friendly error messages and posted what the exact error is that your getting.

    Troy Johnson www.anothercodesite.com/blog

    ASP.NET csharp asp-net business question

  • Disable a button a web form.
    J johnsontroye

    use javascript to disable the button. www.anothercodesite.com/blog

    ASP.NET tutorial question

  • Dataset containing nullable datetime values does not like a null datetime?
    J johnsontroye

    try setting it to DBNull.Value That is the equiv. of a null in the db, "Null" is not.

    Troy Johnson www.anothercodesite.com/blog

    Visual Basic help csharp visual-studio winforms

  • Can we use ASP.NET website inside the Silverlight application
    J johnsontroye

    What do you mean by "Can we use it?" Are you asking if you can reference asp.net objects from a silverlight application? Are you asking if you can display/run asp.net pages within a silverlight control? Are you asking if Silverlight application can host an asp.net site?

    Troy Johnson www.anothercodesite.com/blog

    WPF csharp asp-net question

  • How to geth the URL of redirecting Website ?
    J johnsontroye

    Try this: Request.ServerVariables("HTTP_Referer")

    Troy Johnson www.anothercodesite.com/blog

    ASP.NET question windows-admin tutorial

  • Linq
    J johnsontroye

    I use a lot of generic collections to hold my object instances. For this reason I have found a lot of the extension methods in combination with lambda expressions to really tighten up my code. I have a large list of examples on a post at: http://www.anothercodesite.com/Blog/post/2008/09/07/Lambda-Expressions-Theres-More-than-One-Way-to-Skin-a-Generic-List.aspx[^] The samples are all in C# towards top of post, and VB towards bottom.

    Troy Johnson www.anothercodesite.com/blog

    Visual Basic csharp linq

  • how to fetch values from stock market in asp.net application
    J johnsontroye

    If you are okay with delayed tick data then there are more options for you. You could use one of the free web services to get the data. Some of these are: http://www.xignite.com/xquotes.asmx?op=GetQuote http://www.extensio.com/websrv http://www.swanandmokashi.com/HomePage/WebServices/ http://www.webservicex.net/stockquote.asmx http://www.gama-system.com/webservices http://www.serviceobjects.com/products/dots\_fastquote.asp?zut=XMS1007 http://glkev.webs.innerhost.com/ http://www.xmethods.com/ve2/ViewListing.po?key=uuid:889A05A5-5C03-AD9B-D456-0E54A527EDEE" Yahoo also has RSS feed for Financial information. You can call http://finance.yahoo.com/q?s=msft and then parse the result. I didn't read the terms and conditions for any of these so be sure to check them out.

    Troy Johnson www.anothercodesite.com/blog

    ASP.NET csharp asp-net tutorial

  • Table vs absolute position
    J johnsontroye

    This is one of those questions that will get you people screaming from both sides of the fence. I have struggled over this question myself, and have come to a conclusion that works well for me. That is, it depends on the situation. These are the advantages of each for me, they may be different for you or someone else. Tables: * I've been using them for 10 years and I can whip them up very quickly, and modify them very quickly. * Relative to using styles, I would say tables are much easier to learn to use. * Once you get good at them, you can learn to use them with minimum impact on size and page weight. Styles: * Generally less markup which means less page weight and faster page load times. * Allows you to dramatically change the layout of the page with little effort. The caveat to this is that you designed the layout of the page good to begin with. Also keep in mind, while this is cool, how often do you really need to do this? * Can make pages more usable for visually impaired people because you are removing a lot of the style markup from the text being read. Also keep in mind that even the hardcore style folks usually advocate using tables in some cases. When you are laying out data that is in a Excel Spreadsheet like format for instance. To sum it up, I don't think there is a right or wrong way to do it. I use both depending on what my goal is. Get it out the door quick as possible? Very fast page load times? Usable for visually impaired? Good luck, Troy

    Troy Johnson www.anothercodesite.com/blog

    Web Development visual-studio question

  • Recommended books on .NET
    J johnsontroye

    I would highly recommend any books by Dino Esposito. He has been writting some great ASP.Net books for years now, and also speaks at all the major Microsoft events. Most of code in his ASP.Net books is written in C#. I would also recommend visiting: http://www.asp.net/learn/[^] There are a lot of good references and videos there to get you started.

    Troy Johnson www.anothercodesite.com/blog

    C# c++ csharp question

  • Opening or Navigating to a .aspx page from SilverLight application
    J johnsontroye

    I do something like this to open a browser window when clicking on something. May not be exactly what you need, but perhaps can get you headed in right direction. string redirectLink = "http://www.somedomain.com/some.xls" string browserWindowOptions = "resizable=1|scrollbars=1|menubar=1|status=1|toolbar=1|titlebar=1|width=1000|height=725|left=5|top=5" HtmlPage.Window.Navigate(new Uri(redirectLink), "_blank", browserWindowOptions)

    Troy Johnson www.anothercodesite.com/blog

    WPF help csharp wcf sysadmin question

  • To format date in datagrid column in silverlight
    J johnsontroye

    If you are binding to collection of custom objects such as Person and that class has a property such as BirthDate you could do the following: First, create DateTimeConverter class as such: Imports System.Windows.Data Public Class DateTimeConverter Implements IValueConverter Public Function Convert(ByVal value As Object, _ ByVal targetType As System.Type, _ ByVal parameter As Object, _ ByVal culture As System.Globalization.CultureInfo) As Object _ Implements System.Windows.Data.IValueConverter.Convert Dim DateValue As DateTime = value Return DateValue.ToShortDateString() End Function Public Function ConvertBack(ByVal value As Object, _ ByVal targetType As System.Type, _ ByVal parameter As Object, _ ByVal culture As System.Globalization.CultureInfo) As Object _ Implements System.Windows.Data.IValueConverter.ConvertBack Dim StrValue As String = value.ToString() Dim ResultDateTime As DateTime If DateTime.TryParse(StrValue, ResultDateTime) Then Return ResultDateTime End If Return value End Function End Class Next, add xmlns to to your projects namespace so you can get reference to your new class such as: xmlns:local="clr-namespace:Silverlight_DataGrid" Next, depending on what type of control you are using to bind to, add reference to your converter for date column. In this case, I have single column in grid, which is bound to DataGridTextColumn. The property in my class i'm binding to is BirthDate. <data:DataGrid x:Name="myDataGrid" Grid.Row="1" AlternatingRowBackground="AliceBlue" Background="WhiteSmoke" BorderBrush="DarkBlue" BorderThickness="2" CanUserResizeColumns="True" CanUserSortColumns="True" Opacity="8" AutoGenerateColumns="False"> <data:DataGrid.Columns> <data:DataGridTextColumn Binding="{Binding BirthDate, Converter={StaticResource DateConverter}}" /> </data:DataGrid.Columns> </data:DataGrid>

    Troy Johnson www.anothercodesite.com/blog

    WPF help tutorial

  • Configurable Image Rotator needs code review
    J johnsontroye

    I recently created a configurable image rotator using Silverlight 2 and C#. I want to post it on Code Project, but I feel like it needs a good solid code review first...and of course whatever changes fall out of that. I was hoping someone here might be willing to take the time to do this for me as I don't have any good Silverlight resources to call on. My major area of concern is how slow the control is loading on the page. I'm doing a handful of asynchronous calls, building a list of image controls before rendering the parent control which contains them. I'm wondering if this is not the optimal way. Or maybe it just needs to be tweaked a little. Any comments would be truly appreciated. As soon as I feel I can share something worth sharing, I will get this up on Code Project in both C# and VB. http://www.anothercodesite.com/Blog/[^] Thank you, Troy Johnson

    Troy Johnson www.anothercodesite.com/blog

    WPF csharp com architecture code-review learning
  • Login

  • Don't have an account? Register

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