.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Asad Ali
Fauzul Azmi
Post New Web Links

AccordionItem will not resize horizontally to its content

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Windows Application
 
The AccordionItem WILL scale vertically to its content, but NOT horizontally.  If you expand down the accordion and then back, it resizes though.  SilverLight does not have this issue, but WPF does...  I see a number of related topics to this, but no solutions that are working for me... plus most the topics are about SilverLight, and this problem has been fixed in SilverLight.  Not sure why it hasn't been fixed in WPF... Here is my template control that will not resize as its content does (btw, the content is a treeview which expands horizontally as sub trees are opened): <Style TargetType="local:AccordionWindow"> <!-- Existing Properties --> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="Background" Value="#BBAF1E2D" /> <Setter Property="Foreground" Value="White" /> <Setter Property="BorderBrush" Value="Black" /> <Setter Property="BorderThickness" Value="1,1,0,1" /> <!-- Dependency Properties --> <Setter Property="Header" Value="Toolbar" /> <Setter Property=


View Complete Post


More Related Resource Links

AccordionItem will not resize horizontally to its content

  
The AccordionItem WILL scale vertically to its content, but NOT horizontally.  If you expand down the accordion and then back, it resizes though.  SilverLight does not have this issue, but WPF does...  I see a number of related topics to this, but no solutions that are working for me... plus most the topics are about SilverLight, and this problem has been fixed in SilverLight.  Not sure why it hasn't been fixed in WPF... Here is my template control that will not resize as its content does (btw, the content is a treeview which expands horizontally as sub trees are opened): <Style TargetType="local:AccordionWindow"> <!-- Existing Properties --> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="Background" Value="#BBAF1E2D" /> <Setter Property="Foreground" Value="White" /> <Setter Property="BorderBrush" Value="Black" /> <Setter Property="BorderThickness" Value="1,1,0,1" /> <!-- Dependency Properties --> <Setter Property="Header" Value="Toolbar" /> <Setter Property="ExpandDirection&

How to resize iframe when content loads..

  
I have an iframe on website A which receives the controls from website B once the form is processed on website B. Here is the page on website A with the iframe. I have hard coded the height at 100px:<iframe id="hdnFrm" name="hdnFrm" src="" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="width:90%;height:100px"></iframe> <form action='http://www.link-exchangers.com/adv_links_addber.aspx' target='hdnFrm' method='post' name='form1'> <table width=90% align=center cellpadding=2 cellspacing=0 border=0> <tr><td valign=top>Contact email: </td><td><input type=text name=web_email value="<?=$web_email;?>" style='width:250px'></td></tr> <tr><td valign=top>Reciprocal link: </td><td><input id=web_recip type=text name=web_recip value="<?=$web_recip;?>" style='width:250px'></td></tr> <tr><td colspan=2 align=center><input type=submit value="Save" style='width:100px'></td></tr> </table></form> Once the Save button is clicked, website B processes the data in this form, and sends messages and a

How to avoid page content wrapping when resize the window

  

How to avoid page content wrapping when resize the window?

i mean when user resize his browser window then the page content

should not be wrap, instead of scroll should appear,

so how can i do that?


How to change the SplitterDistance to resize the content?

  
I have a splitter panel containing a tab control (Dock = Fill !). When I change the SplitterDistance programatically the size of tab does not change so the two scroll bars appear. What to do after changing SplitterDistance in order to disappear the scrollbars?
Gabriel

Page Content getting cutoff horizontally

  

Hello,

I have a custom masterpage based largely on Randy Drisgill's starter masterpage.  The problem I am experiencing is that if someone has a view setup that has 10+ columns in it for a library or list, then the last column is cut off the page on th efar right.  The content is also exceeding the content region of my default page layout (which is not customized).

Does anyone know how this can be fixed?

This issue also exists for web parts that has content that exceeds the browser window in height.  The content gets cut off.  No vertical scroll bar to move the page down.

Very Bizarre.  Any help would be greatly appreciated.  I am desperate to figure these issues out.

Very Sincerely,

Tim


Require a Window whose content will resize as the winow is resized

  

Respected Sir/Mam

I want to code for a window whose content must automatically fit into the window as the window is resized by the user

For Example:Gmail Window all contents are perfectly resized when you resize the window

Thanking You

Salim Shaikh


SharePoint Tutorial - Content Types

  
SharePoint content types provide users with a way to manage and organize content in a more meaningful way. It's a reusable of settings you want to apply to a particular type of document in a library or item in a list.

Enabling Users to Maintain SharePoint Content

  
When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

Application Vs. Content Pages in SharePoint

  
SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Enabling Users to Maintain SharePoint Content

  
When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Content Types in MOSS 2007

  
In this article I will try to describe the one of the best feature in Microsoft office Share Point 2007 called Content Types.

Content types are simply collection of contents.Each content in a Content type can have different settings.Basically it is a reusable collection of settings which you want to apply to a particular category of contents.

Content Query Web Part missing in SharePoint 2010

  
If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Unique content within master page based on conditions met

  

 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?

Thanks!


Passing Linq Statement between master and content page

  

I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
        Get
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result
   'then

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
        Else
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub


On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If


m.searchRes is always nothing. 

What am I doing wrong here?

Thanks


Centering an img in a div both horizontally and vertically

  

I realize this is simply an HTML question, but I'm having a difficult figuring out the CSS stuff to center an <img /> tag within a <div> tag.

<div style="width: 180px; height: 180px; padding: 10px; margin-top: auto; margin-bottom: auto;">
  <img src="file" alt="" style="width: 160px; height: 80px;" />
</div>

It centers horizontally just fine, but I cannot get it to center vertically within the div.

Can anyone point out what I'm missing???


Content page control passes as argument to javascript function

  

Here is the content page:

********************************************************************

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="JavaDynamicCopyValue.aspx.cs" Inherits="JavaDynamicCopyValue" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script type="text/javascript" >
 function copyValue(input, output )
{
   ouput.value = input.value;
   return true;
}
 </script>
 <asp:TextBox ID="txt1" runat="server" onchange="copyValue(this,document.getElementById('<%=txt2.ClientID%>'))"></asp:TextBox>
    <br />
    <br />
    <asp:TextBox ID="txt2" runat="server"></asp:TextBox>
</asp:Content>

********************************************************************

I got a javascript run time error says output is undefined. if I view source of the page, the txt1 markup became:

<input name="ctl00$ContentPlaceHol

Composite Control which contains arbitrary content defined in .aspx of parent and thier ViewState

  

I want to write own control which can contain other. And I want to define content of the control in the .aspx file where the control is defined. I have written such control. But now I have issue with ViewState of inner controls of my control. The following samle illustrates the issue: I defined two asp:DropDownList ID="ddl1" and ID="ddl2" One of them is inside of my control and other is outside. When posback is occurred asp:DropDownList ID="ddl1 loses state and becomes empty. How to say ASP.net to store state of inner controls defined by this way?

MyControl.ascx:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyControl.ascx.cs" Inherits="DynamicControls.Controls.MyControl" %>

<div class="box">
    <div class="Header-Left">
        <div class="Header-Right">
            My Control
        </div>
    </div>
    <div class="Content">
        <asp:PlaceHolder ID="contentPlace" runat="Server" />
    </div>
&

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend